Describe the bug
When running wheels deploy from a directory that is not a git repository, the version string becomes "fatal: not a git repository (or any of the parent directories): .git" instead of a short SHA. The $gitShortSha() method merges stderr into stdout via redirectErrorStream(true) and reads the output without checking the git process exit code.
To Reproduce
Steps to reproduce the behavior:
- Create a new app directory without git:
wheels new testapp && cd testapp
- Run
wheels deploy init and configure deploy.yml.
- Run
wheels deploy.
- See output:
Deployed testapp version fatal: not a git repository (or any of the parent directories): .git to 1 host(s): ...
Expected behavior
When not in a git repo, the version should gracefully fall back to "unknown" (or similar). The deploy should not fail or produce a broken version string.
Desktop
Describe the bug
When running wheels deploy from a directory that is not a git repository, the version string becomes "fatal: not a git repository (or any of the parent directories): .git" instead of a short SHA. The
$gitShortSha()method merges stderr into stdout viaredirectErrorStream(true)and reads the output without checking the git process exit code.To Reproduce
Steps to reproduce the behavior:
wheels deploy initand configuredeploy.yml.wheels deploy.Deployed testapp version fatal: not a git repository (or any of the parent directories): .git to 1 host(s): ...Expected behavior
When not in a git repo, the version should gracefully fall back to "unknown" (or similar). The deploy should not fail or produce a broken version string.
Desktop