mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-20 08:34:04 +01: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}'"));
|
||||
}
|
||||
|
||||
let argument_list = flags.join(",");
|
||||
let script = {
|
||||
let script = if flags.is_empty() {
|
||||
format!(
|
||||
"Start-Process '{}' -WindowStyle hidden",
|
||||
exec.unwrap_or("komorebi.exe")
|
||||
)
|
||||
} else {
|
||||
let argument_list = flags.join(",");
|
||||
format!(
|
||||
"Start-Process '{}' -ArgumentList {argument_list} -WindowStyle hidden",
|
||||
exec.unwrap_or("komorebi.exe")
|
||||
|
||||
Reference in New Issue
Block a user