mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Merge branch 'fix-ssh-cmd-mutation' of https://github.com/cwelsys/kitty
This commit is contained in:
@@ -692,7 +692,8 @@ func run_ssh(ssh_args, server_args, found_extra_args []string, ssh_config_channe
|
|||||||
return master_is_alive
|
return master_is_alive
|
||||||
}
|
}
|
||||||
master_checked = true
|
master_checked = true
|
||||||
check_cmd := slices.Insert(cmd, 1, "-O", "check")
|
// slices.Insert can mutate cmd's backing array in place; clone so cmd stays intact
|
||||||
|
check_cmd := slices.Insert(slices.Clone(cmd), 1, "-O", "check")
|
||||||
master_is_alive = exec.Command(check_cmd[0], check_cmd[1:]...).Run() == nil
|
master_is_alive = exec.Command(check_cmd[0], check_cmd[1:]...).Run() == nil
|
||||||
return master_is_alive
|
return master_is_alive
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user