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

Commitc1b2304

Browse files
test(agent/agentssh): use fish shell compatible exit status checking (#18824)
This (week-old) test was failing in my workspace because I use fish shell. I really do not like that Fish shell does not support `$?`, but I also do like Fish shell! We have a few people at Coder who use it who would appreciate this change.
1 parentb882d46 commitc1b2304

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎agent/agentssh/agentssh_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ func TestSSHServer_ClosesStdin(t *testing.T) {
453453
// exit code 1 if it hits EOF, which is what we want to test.
454454
cmdErrCh:=make(chanerror,1)
455455
gofunc() {
456-
cmdErrCh<-sess.Start(fmt.Sprintf("echo started;read;echo\"read exit code: $?\" > %s",filePath))
456+
cmdErrCh<-sess.Start(fmt.Sprintf(`echo started; echo "read exit code: $(read && echo 0 || echo 1)" > %s`,filePath))
457457
}()
458458

459459
cmdErr:=testutil.RequireReceive(ctx,t,cmdErrCh)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp