Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Fix exit code#45

Merged
cmoog merged 1 commit intomasterfromfix-exitcode
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes fromall 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
8 changes: 4 additions & 4 deletionscmd/coder/shell.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,7 +63,6 @@ func sendResizeEvents(ctx context.Context, termfd int, process wsep.Process) {

err=process.Resize(ctx,uint16(height),uint16(width))
iferr!=nil {
flog.Error("set term size: %v",err)
return
}

Expand DownExpand Up@@ -99,7 +98,7 @@ func (cmd *shellCmd) Run(fl *pflag.FlagSet) {
os.Exit(exitErr.Code)
}
iferr!=nil {
flog.Fatal("run command: %v. Is %q online?",err,envName)
flog.Fatal("run command: %v",err)
}
}

Expand DownExpand Up@@ -133,6 +132,7 @@ func runCommand(ctx context.Context, envName string, command string, args []stri
Command:command,
Args:args,
TTY:tty,
Stdin:true,
})
iferr!=nil {
returnerr
Expand DownExpand Up@@ -163,8 +163,8 @@ func runCommand(ctx context.Context, envName string, command string, args []stri
}
}()
err=process.Wait()
ifxerrors.Is(err,ctx.Err()) {
returnxerrors.Errorf("network error")
iferr!=nil&&xerrors.Is(err,ctx.Err()) {
returnxerrors.Errorf("network error, is %q online?",envName)
}
returnerr
}
2 changes: 1 addition & 1 deletiongo.mod
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@ module cdr.dev/coder-cli
go1.14

require (
cdr.dev/wsepv0.0.0-20200612224539-e66f8bb64883
cdr.dev/wsepv0.0.0-20200615020153-e2b1c576fc40
github.com/fatih/colorv1.9.0// indirect
github.com/gorilla/websocketv1.4.1
github.com/kirsle/configdirv0.0.0-20170128060238-e45d2f54772f
Expand Down
8 changes: 8 additions & 0 deletionsgo.sum
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,14 @@ cdr.dev/wsep v0.0.0-20200602025116-5cbe721683df h1:9KgAywWKNQMYi3gvu4HyExiuXJhoN
cdr.dev/wsep v0.0.0-20200602025116-5cbe721683df/go.mod h1:2VKClUml3gfmLez0gBxTJIjSKszpQotc2ZqPdApfK/Y=
cdr.dev/wsep v0.0.0-20200612224539-e66f8bb64883 h1:nr/trZU6911y9PohrsVaujzJPrtN7bUSX7yfvenYbc0=
cdr.dev/wsep v0.0.0-20200612224539-e66f8bb64883/go.mod h1:2VKClUml3gfmLez0gBxTJIjSKszpQotc2ZqPdApfK/Y=
cdr.dev/wsep v0.0.0-20200613153816-ed81c4ad638b h1:cd2Fx+EBMWxWFMdODG/OWRhF9X8OWQ5DnsCEeCfd0Y4=
cdr.dev/wsep v0.0.0-20200613153816-ed81c4ad638b/go.mod h1:2VKClUml3gfmLez0gBxTJIjSKszpQotc2ZqPdApfK/Y=
cdr.dev/wsep v0.0.0-20200613225213-3384735ae5e5 h1:x6UJpHOO7mz//OrAdysmQIW+jdXAQ+n35eol5s+O6WU=
cdr.dev/wsep v0.0.0-20200613225213-3384735ae5e5/go.mod h1:2VKClUml3gfmLez0gBxTJIjSKszpQotc2ZqPdApfK/Y=
cdr.dev/wsep v0.0.0-20200613231142-71da214c188e h1:ZOQoyb0N07vc9MMet/IQFCpKSObcZZt9o+nPFz7/zNM=
cdr.dev/wsep v0.0.0-20200613231142-71da214c188e/go.mod h1:2VKClUml3gfmLez0gBxTJIjSKszpQotc2ZqPdApfK/Y=
cdr.dev/wsep v0.0.0-20200615020153-e2b1c576fc40 h1:f369880iSAZ3cXwvbdc9WIyy3FZ4yanusYZjaVHeis4=
cdr.dev/wsep v0.0.0-20200615020153-e2b1c576fc40/go.mod h1:2VKClUml3gfmLez0gBxTJIjSKszpQotc2ZqPdApfK/Y=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp