forked from didirus/AstralRinth
feat: split wrapper command on linux (#4427)
* feat: split wrapper command on linux * feat: use code from #3900 * feat: also use shlex on Windows * feat: add a version number to global settings * feat(app): add settings v2, where wrapper command are split
This commit is contained in:
@@ -743,7 +743,14 @@ impl Process {
|
||||
// We do not wait on the post exist command to finish running! We let it spawn + run on its own.
|
||||
// This behaviour may be changed in the future
|
||||
if let Some(hook) = post_exit_command {
|
||||
let mut cmd = hook.split(' ');
|
||||
let mut cmd = shlex::split(&hook)
|
||||
.ok_or_else(|| {
|
||||
crate::ErrorKind::LauncherError(format!(
|
||||
"Invalid post-exit command: {hook}",
|
||||
))
|
||||
})?
|
||||
.into_iter();
|
||||
|
||||
if let Some(command) = cmd.next() {
|
||||
let mut command = Command::new(command);
|
||||
command.args(cmd).current_dir(
|
||||
|
||||
Reference in New Issue
Block a user