mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-09 14:42:44 +02:00
fix(cli): remedy regression in start cmd
This commit remedies a regression noticed by user @notkvwu in #493, which results in 'komorebic start' failing, due to an empty ArgumentList being passed to the PS Start-Process command. This has been fixed by ensuring that the ArgumentList is only passed when the user has specified flags on the start command. fix #493
This commit is contained in:
@@ -1468,8 +1468,13 @@ fn main() -> Result<()> {
|
|||||||
flags.push(format!("'--tcp-port={port}'"));
|
flags.push(format!("'--tcp-port={port}'"));
|
||||||
}
|
}
|
||||||
|
|
||||||
let argument_list = flags.join(",");
|
let script = if flags.is_empty() {
|
||||||
let script = {
|
format!(
|
||||||
|
"Start-Process '{}' -WindowStyle hidden",
|
||||||
|
exec.unwrap_or("komorebi.exe")
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
let argument_list = flags.join(",");
|
||||||
format!(
|
format!(
|
||||||
"Start-Process '{}' -ArgumentList {argument_list} -WindowStyle hidden",
|
"Start-Process '{}' -ArgumentList {argument_list} -WindowStyle hidden",
|
||||||
exec.unwrap_or("komorebi.exe")
|
exec.unwrap_or("komorebi.exe")
|
||||||
|
|||||||
Reference in New Issue
Block a user