1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

handle quotes in post-setup commands

This commit is contained in:
Robin Appelman 2022-03-16 15:35:09 +01:00
commit 9cca74924d
3 changed files with 14 additions and 2 deletions

View file

@ -356,11 +356,15 @@ async fn setup(docker: &mut Docker, options: CloudOptions, config: &HazeConfig)
}
for service in &cloud.services {
for cmd in service.post_setup(&docker, &cloud.id).await? {
cloud.exec(docker, cmd.split(" ").collect(), false).await?;
cloud
.exec(docker, shell_words::split(&cmd).into_diagnostic()?, false)
.await?;
}
}
for cmd in &config.auto_setup.post_setup {
cloud.exec(docker, cmd.split(" ").collect(), false).await?;
cloud
.exec(docker, shell_words::split(&cmd).into_diagnostic()?, false)
.await?;
}
}
Ok(cloud)