This commit is contained in:
+6
-4
@@ -75,12 +75,14 @@ fn build_inner(
|
||||
cmd: Option<String>,
|
||||
) -> Result<()> {
|
||||
let config = inject::inspect_config(image)?;
|
||||
let command = cmd.unwrap_or_else(|| inject::infer_command(&config));
|
||||
let exec_script =
|
||||
inject::build_exec_script(&command, &config.env, config.working_dir.as_deref());
|
||||
let argv = match cmd {
|
||||
Some(s) => vec!["/bin/sh".into(), "-c".into(), s],
|
||||
None => inject::infer_argv(&config),
|
||||
};
|
||||
inject::inject(
|
||||
mount_path,
|
||||
&exec_script,
|
||||
&argv,
|
||||
&config.env,
|
||||
config.user.as_deref(),
|
||||
config.working_dir.as_deref(),
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user