Quote Dosh sessions remote command
This commit is contained in:
@@ -308,11 +308,10 @@ fn run_sessions_command(
|
||||
.arg(format!("UserKnownHostsFile={}", known_hosts.display()));
|
||||
}
|
||||
let script = r#"printf 'tmux sessions:\n'; tmux ls 2>/dev/null || printf ' none\n'; printf '\nDosh service:\n'; systemctl --user --no-pager --plain status dosh-server.service 2>/dev/null | sed -n '1,8p' || pgrep -af dosh-server || printf ' not running\n'"#;
|
||||
let remote_command = format!("sh -lc {}", shell_word(script));
|
||||
let status = command
|
||||
.arg(server)
|
||||
.arg("sh")
|
||||
.arg("-lc")
|
||||
.arg(script)
|
||||
.arg(remote_command)
|
||||
.status()
|
||||
.context("run remote sessions command")?;
|
||||
if !status.success() {
|
||||
|
||||
Reference in New Issue
Block a user