From 4195d9966553a1b98d794e82624d589ee19f102d Mon Sep 17 00:00:00 2001 From: Christos KK Loverdos Date: Sun, 2 Jun 2019 21:08:42 +0300 Subject: [PATCH] Use bash in a more portable way --- sshcode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sshcode.go b/sshcode.go index a31e3d8..97e7502 100644 --- a/sshcode.go +++ b/sshcode.go @@ -56,7 +56,7 @@ func sshCode(host, dir string, o options) error { dlScript := downloadScript(codeServerPath) // Downloads the latest code-server and allows it to be executed. - sshCmdStr := fmt.Sprintf("ssh %v %v /bin/bash", o.sshFlags, host) + sshCmdStr := fmt.Sprintf("ssh %v %v '/usr/bin/env bash'", o.sshFlags, host) sshCmd := exec.Command("sh", "-c", sshCmdStr) sshCmd.Stdout = os.Stdout