This repository was archived by the owner on Jan 17, 2021. It is now read-only.
File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -54,27 +54,29 @@ More info: https://github.com/codercom/sshcode
54
54
55
55
const codeServerPath = "/tmp/codessh-code-server"
56
56
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
+
59
59
mkdir -p ~/.local/share/code-server
60
60
cd ` + filepath .Dir (codeServerPath ) + `
61
61
wget -N https://codesrv-ci.cdr.sh/latest-linux
62
62
[ -f ` + codeServerPath + ` ] && rm ` + codeServerPath + `
63
63
ln latest-linux ` + codeServerPath + `
64
- chmod +x ` + codeServerPath + `
65
- '`
64
+ chmod +x ` + codeServerPath
66
65
// Downloads the latest code-server and allows it to be executed.
67
66
sshCmdStr := fmt .Sprintf ("ssh" +
68
- " -tt " + * sshFlags + " " +
69
- host ,
67
+ " " + * sshFlags + " " +
68
+ host + " /bin/bash" ,
70
69
)
71
70
sshCmd := exec .Command ("sh" , "-c" , sshCmdStr )
72
71
sshCmd .Stdout = os .Stdout
73
72
sshCmd .Stderr = os .Stderr
74
73
sshCmd .Stdin = strings .NewReader (downloadScript )
75
74
err := sshCmd .Run ()
76
75
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
+ )
78
80
}
79
81
80
82
if ! (* skipSyncFlag ) {
You can’t perform that action at this time.
0 commit comments