FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

WIP: Suppress or compact output where possible by gartnera · Pull Request #68 · coder/sshcode · GitHub

This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Repository navigation

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .go  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
11 changes: 6 additions & 5 deletions main.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL