Skip to content
This repository has been archived by the owner on Jan 17, 2021. It is now read-only.

Commit

Permalink
Kill preexisting sshcode remote process for a user
Browse files Browse the repository at this point in the history
  • Loading branch information
sreya committed May 2, 2019
1 parent 804c11e commit 2f80f3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sshcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,14 @@ func downloadScript(codeServerPath string) string {
return fmt.Sprintf(
`set -euxo pipefail || exit 1
pkill -f %v || true
mkdir -p ~/.local/share/code-server %v
cd %v
wget -N https://codesrv-ci.cdr.sh/latest-linux
[ -f %v ] && rm %v
ln latest-linux %v
chmod +x %v`,
codeServerPath,
filepath.Dir(codeServerPath),
filepath.Dir(codeServerPath),
codeServerPath,
Expand Down
2 changes: 1 addition & 1 deletion sshcode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestSSHCode(t *testing.T) {
wg.Add(1)
go func() {
defer wg.Done()
err := sshCode("127.0.0.1", "", options{
err := sshCode("foo@127.0.0.1", "", options{
sshFlags: testSSHArgs(sshPort),
localPort: localPort,
remotePort: remotePort,
Expand Down

0 comments on commit 2f80f3f

Please sign in to comment.