Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ chmod +x ` + codeServerPath
host + " /bin/bash",
)
sshCmd := exec.Command("sh", "-c", sshCmdStr)
sshCmd.Stdout = os.Stdout
sshCmd.Stderr = os.Stderr
sshCmd.Stdin = strings.NewReader(downloadScript)
err := sshCmd.Run()
output, err := sshCmd.CombinedOutput()
if err != nil {
flog.Fatal("failed to update code-server: %v\n---ssh cmd---\n%s\n---download script---\n%s", err,

flog.Fatal("failed to update code-server: %v\n---ssh cmd---\n%s\n---download script---\n%s\n---output---\n%s", err,
sshCmdStr,
downloadScript,
output,
)
}

Expand Down Expand Up @@ -331,7 +331,7 @@ func rsync(src string, dest string, sshFlags string, excludePaths ...string) err
excludeFlags[i] = "--exclude=" + path
}

cmd := exec.Command("rsync", append(excludeFlags, "-azvr",
cmd := exec.Command("rsync", append(excludeFlags, "-azr",
"-e", "ssh "+sshFlags,
// Only update newer directories, and sync times
// to keep things simple.
Expand All @@ -340,6 +340,7 @@ func rsync(src string, dest string, sshFlags string, excludePaths ...string) err
// locally in order to properly delete an extension.
"--delete",
"--copy-unsafe-links",
"--info=progress2",
src, dest,
)...,
)
Expand Down