-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore the error when running podman machine ssh <command>
#21207
Ignore the error when running podman machine ssh <command>
#21207
Conversation
cmd/podman/machine/ssh.go
Outdated
@@ -57,10 +57,8 @@ func ssh(cmd *cobra.Command, args []string) error { | |||
// provided the VM name. If so, we check. The VM name, | |||
// if provided, must be in args[0]. | |||
if len(args) > 0 { | |||
// Ignore the error, See https://github.com/containers/podman/issues/21183#issuecomment-1879713572 | |||
validVM, err = provider.IsValidVMName(args[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validVM, err = provider.IsValidVMName(args[0]) | |
validVM, _ = provider.IsValidVMName(args[0]) |
To pass the linter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fix the code as suggested.
LGTM once comment is addressed |
Signed-off-by: Shion Tanaka <[email protected]>
a1e3ff2
to
83fa484
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan, tnk4on The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
adaf3ca
into
containers:main
Fixes the error that occurs when executing a command without a machine name when using podman-machine-default.
Fixes: #21183 (and fix PR #21114)
[NO NEW TESTS NEEDED]
Does this PR introduce a user-facing change?