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

initialisation fails in environments without git #950

Closed
eidam opened this issue May 10, 2022 · 1 comment · Fixed by #956 or #954
Closed

initialisation fails in environments without git #950

eidam opened this issue May 10, 2022 · 1 comment · Fixed by #956 or #954

Comments

@eidam
Copy link
Contributor

eidam commented May 10, 2022

repro https://stackblitz.com/edit/node-d5adxm?file=package.json&terminal=init

npx wrangler init
success Install finished in 6.256s

 ⛅️ wrangler 2.0.2 
-------------------
Using npm as package manager.
✨ Created wrangler.toml

✘ [ERROR] Command failed with ENOENT: git --version

  spawn git ENOENT


If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new.
@threepointone
Copy link
Contributor

Dammit I thought I'd handled this. Will fix asap.

threepointone added a commit that referenced this issue May 10, 2022
When a command isn't available on a system, calling `execa()` on it throws an error, and not just a non zero exitCode. This patches fixes the flow so we don't crash the whole process when that happens on testing the presence of `git` when calling `wrangler init`.

Fixes #950
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants