Skip to content

Commit

Permalink
fix AssumeYes not work when set flag (#684)
Browse files Browse the repository at this point in the history
Signed-off-by: x893675 <x893675@icloud.com>
  • Loading branch information
x893675 committed Dec 12, 2023
1 parent 50e0ed0 commit 34a23e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cli/sudo/sudo.go
Expand Up @@ -135,8 +135,12 @@ func MultiNIC(name string, sshConfig *sshutils.SSH, streams options.IOStreams, a

if err != nil {
logger.Error(err)
if options.AssumeYes {
logger.Infof("skip this error,continue exec cmd")
return true
}
logger.Errorf("===========>%s PRECHECK FAILED!", name)
if err == errorMultiNIC {
if errors.Is(err, errorMultiNIC) {
_, _ = streams.Out.Write([]byte("node has multi nic,and --ip-detect flag not specified,default ip " +
"detect method is 'first-found',which maybe chose a wrong one,you can add --ip-detect flag to specify it." + "\n"))
}
Expand Down

0 comments on commit 34a23e7

Please sign in to comment.