Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lage throws error when ran outside git repo #689

Open
paulius-valiunas opened this issue Jul 21, 2023 · 0 comments
Open

Lage throws error when ran outside git repo #689

paulius-valiunas opened this issue Jul 21, 2023 · 0 comments

Comments

@paulius-valiunas
Copy link
Contributor

Describe the bug
Lage refuses to run if it's not in a git repo:

...> pnpm build

> monorepo@ build /home/paulius/code/other/lage-starter
> lage build

lage - Version 2.7.5 - 23 Workers
[11:15:15] - error     Error: Command failed with exit code 128: git ls-files -z
fatal: not a git repository (or any of the parent directories): .git
 ELIFECYCLE  Command failed with exit code 1.

Most users probably use lage in a git repo, but I wanted to try it out before creating one. Even when I initialized a git repo, it still wasn't satisfied as it couldn't find HEAD, so I also had to create a commit. I think that's a bit excessive, especially because lage doesn't seem to have any meaningful integration with git.

To Reproduce
Steps to reproduce the behavior:

  1. Create an empty pnpm workspace in a local folder (not a git repo)
  2. Add a package with a "build" script and a lage "build" pipeline
  3. Try running lage build
  4. See error above

Expected behavior
The build script should be called

Environment/Troubleshooting

  System:
    OS: Linux 5.15 openSUSE Tumbleweed 20230716
    CPU: (24) x64 Intel(R) Core(TM) i9-9920X CPU @ 3.50GHz
    Memory: 2.58 GB / 15.52 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 18.16.1 - ~/.nvs/default/bin/node
    Yarn: 1.22.19 - ~/.local/share/pnpm/yarn
    npm: 9.5.1 - ~/.nvs/default/bin/npm
    pnpm: 8.6.7 - ~/.nvs/default/bin/pnpm
  Managers:
    pip3: 23.1.2 - /usr/bin/pip3
    RubyGems: 3.4.10 - /usr/bin/gem
  Utilities:
    Make: 4.4.1 - /usr/bin/make
    GCC: 13.1.1 - /usr/bin/gcc
    Git: 2.41.0 - /usr/bin/git
    Clang: 16.0.6 - /usr/bin/clang
    Mercurial: 6.4.4 - /usr/bin/hg
    Curl: 8.1.2 - /usr/bin/curl
  Virtualization:
    Docker: 24.0.4 - /usr/bin/docker
  IDEs:
    Nano: 7.2 - /usr/bin/nano
    VSCode: 1.80.1 - /home/paulius/.vscode-server/bin/74f6148eb9ea00507ec113ec51c489d6ffb4b771/bin/remote-cli/code
    Vim: 9.0 - /usr/bin/vim
  Languages:
    Bash: 5.2.15 - /usr/bin/bash
    Go: 1.20.5 - /usr/local/go/bin/go
    Perl: 5.36.1 - /usr/bin/perl
    Python3: 3.11.4 - /usr/bin/python3
    Ruby: 3.2.2 - /usr/bin/ruby
  Databases:
    PostgreSQL: 15.3 - /usr/bin/postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant