bottlerocket-os / bottlerocket-os/twoliter

build-kit: improve error message when `cargo` and `cargo-make` are not installed

Open
#320 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
34
Forks
43
Avg merge
11h 13m
Merged PRs (30d)
16

Description

If you try to run `twoliter build kit` when `cargo` and `cargo-make` are not installed, you will just get an error message like

```
Error: Unable to start command
```

with no hint as to why it was unable to start.

This may affect other `twoliter build` commands as well, but I haven't confirmed that yet.

We should either surface the `stderr` of the command [here](https://github.com/bottlerocket-os/twoliter/blob/8a29af774b87fe1419ea02b8233be90c2884f480/twoliter/src/common.rs#L25) or explicitly check if `cargo` and `cargo-make` exist.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with `twoliter build kit` when `cargo` and `cargo-make` are unavailable, then inspect the command-starting code at `twoliter/src/common.rs` around line 25. Done means the error identifies the missing command or surfaces a useful underlying error instead of only saying `Unable to start command`; check whether the same behavior affects other `twoliter build` commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.