Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6aa641b

Browse files
committedApr 20, 2019
fixup! Pass ssh flags to rsync
1 parent a08ee3b commit 6aa641b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed
 

‎main.go

+9-7
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,29 @@ More info: https://github.com/codercom/sshcode
5454

5555
const codeServerPath = "/tmp/codessh-code-server"
5656

57-
downloadScript := `/bin/bash -c 'set -euxo pipefail || exit 1
58-
wget -q https://codesrv-ci.cdr.sh/latest-linux -O ` + codeServerPath + `
57+
downloadScript := `set -euxo pipefail || exit 1
58+
5959
mkdir -p ~/.local/share/code-server
6060
cd ` + filepath.Dir(codeServerPath) + `
6161
wget -N https://codesrv-ci.cdr.sh/latest-linux
6262
[ -f ` + codeServerPath + ` ] && rm ` + codeServerPath + `
6363
ln latest-linux ` + codeServerPath + `
64-
chmod +x ` + codeServerPath + `
65-
'`
64+
chmod +x ` + codeServerPath
6665
// Downloads the latest code-server and allows it to be executed.
6766
sshCmdStr := fmt.Sprintf("ssh" +
68-
" -tt " + *sshFlags + " " +
69-
host,
67+
" " + *sshFlags + " " +
68+
host + " /bin/bash",
7069
)
7170
sshCmd := exec.Command("sh", "-c", sshCmdStr)
7271
sshCmd.Stdout = os.Stdout
7372
sshCmd.Stderr = os.Stderr
7473
sshCmd.Stdin = strings.NewReader(downloadScript)
7574
err := sshCmd.Run()
7675
if err != nil {
77-
flog.Fatal("failed to update code-server: %v", err)
76+
flog.Fatal("failed to update code-server: %v\n---ssh cmd---\n%s\n---download script---\n%s", err,
77+
sshCmdStr,
78+
downloadScript,
79+
)
7880
}
7981

8082
if !(*skipSyncFlag) {

0 commit comments

Comments
 (0)
This repository has been archived.