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

Commit592bea6

Browse files
authored
Check for perm error in coder config-ssh (#140)
1 parent0d9db37 commit592bea6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎internal/cmd/configssh.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ func configSSH(configpath *string, remove *bool) func(cmd *cobra.Command, _ []st
130130
}
131131
err=writeSSHKey(ctx,client,privateKeyFilepath)
132132
iferr!=nil {
133-
fmt.Printf("Your private ssh key already exists at\"%s\"\nYou may need to remove the existing file and re-run this command\n",privateKeyFilepath)
133+
if!xerrors.Is(err,os.ErrPermission) {
134+
returnxerrors.Errorf("write ssh key: %w",err)
135+
}
136+
fmt.Printf("Your private ssh key already exists at\"%s\"\nYou may need to remove the existing private key file and re-run this command\n\n",privateKeyFilepath)
134137
}else {
135138
fmt.Printf("Your private ssh key was written to\"%s\"\n",privateKeyFilepath)
136139
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp