Unhelpful error thrown when cargo is missing #13
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
This rather cryptic error is thrown from:
rust.aws-cdk-lambda/lib/build.ts
Line 178 in 73b8cdb
... when trying to call
cargo.stderr.toString()
. The reason is thatcargo.stderr
may benull
if acargo
executable was not found by the call tospawnSync('cargo' /* ... other args... */)
.Troubleshooting:
If, when you run
which cargo
in your usual shell, you getcargo not found
or similar, then you need to make sure thecargo
executable is both installed and on your shell's path.Recommendations:
I think ideally this library should have some way of double-checking whether
cargo
is indeed on-path (I'm not sure what the usual approach for this is), but this kind of environment health-check may arguably be out-of-scope.At the very least, it would save some onboarding friction if this library could, in the event of
cargo.stderr
beingnull
, suggest that perhaps cargo is either not installed or not on path.The text was updated successfully, but these errors were encountered: