mirror of
https://github.com/vhaudiquet/ecrou.git
synced 2026-11-12 22:22:44 +00:00
fix(cli): remove the --arch flag
KVM runs only the host architecture, so the flag could not mean what it suggested: a mismatched value downloaded a foreign rootfs that extracted cleanly and died at boot with a cryptic guest-side exec error. The flag's real job, picking the image variant to fetch, is the library's; RunOptions.arch keeps that role and an empty value still resolves to the host architecture.
This commit is contained in:
1 parent
29cd6af609
commit
74c3744d39
2 files changed
-6
No files matched your search
@@ -46,9 +46,6 @@ pub struct RunArgs {
|
|||||||
/// Guest environment KEY=VALUE (repeatable)
|
/// Guest environment KEY=VALUE (repeatable)
|
||||||
#[arg(short = 'e', long = "env")]
|
#[arg(short = 'e', long = "env")]
|
||||||
pub env: Vec<String>,
|
pub env: Vec<String>,
|
||||||
/// Target architecture; the host architecture when omitted
|
|
||||||
#[arg(short = 'a', long)]
|
|
||||||
pub arch: Option<String>,
|
|
||||||
/// Suppress console noise
|
/// Suppress console noise
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub quiet: bool,
|
pub quiet: bool,
|
||||||
|
|||||||
@@ -38,9 +38,6 @@ fn cmd_run(args: &RunArgs, cli_verbose: bool) -> std::process::ExitCode {
|
|||||||
no_cache: args.no_cache,
|
no_cache: args.no_cache,
|
||||||
..RunOptions::default()
|
..RunOptions::default()
|
||||||
};
|
};
|
||||||
if let Some(arch) = &args.arch {
|
|
||||||
options.arch = arch.clone();
|
|
||||||
}
|
|
||||||
for spec in &args.env {
|
for spec in &args.env {
|
||||||
match parse_env(spec) {
|
match parse_env(spec) {
|
||||||
Ok((k, v)) => options.env.push((k, v)),
|
Ok((k, v)) => options.env.push((k, v)),
|
||||||
|
|||||||
Reference in new issue
Block a user