-
-
Notifications
You must be signed in to change notification settings - Fork 107
Description
Description
When running cargo lambda build in an environment where only a specific toolchain version is installed (e.g., 1.90.0 or 1.91.0), the command automatically installs the stable toolchain instead of using the currently active toolchain.
Steps to Reproduce
- Install only a specific toolchain version (e.g., 1.90.0 or 1.91.0)
- Verify the active toolchain with rustup show
- Run cargo lambda build --release --target aarch64-unknown-linux-musl
- Observe that rustup +stable target add ... is executed, installing the stable toolchain
Expected Behavior
The command should use the currently active toolchain (e.g., 1.90.0) and add the target component to that toolchain: rustup +1.90.0 target add aarch64-unknown-linux-musl
Actual Behavior
The command attempts to use the stable toolchain, which triggers an installation: rustup +stable target add aarch64-unknown-linux-musl
Possible Cause
In crates/cargo-lambda-build/src/toolchain.rs:17-22, the channel type (Channel::Stable, etc.) is directly converted to a toolchain name string ("stable", etc.). However, while 1.90.0 is from the stable channel, the toolchain names "1.90.0" and "stable" refer to different toolchains in rustup.