Skip to content

Commit

Permalink
Merge pull request #326 from pschmitt/fix-ssh-options
Browse files Browse the repository at this point in the history
Don't pass invalid options to the SSH binary
  • Loading branch information
moul authored Oct 13, 2019
2 parents 36647a1 + 2545aa8 commit 334dc49
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/commands/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ func runSSHWrapperCommand(cmd *cobra.Command, args []string) error {
}
for _, flag := range config.SSHStringFlags {
for _, val := range viper.GetStringSlice(flag) {
if (flag == "o" || flag == "O") && val == "false" {
logger().Debug(
"Skip invalid option:",
zap.String("flag", flag),
zap.String("val", val),
)
continue
}
options = append(options, fmt.Sprintf("-%s", flag))
options = append(options, val)
}
Expand Down

0 comments on commit 334dc49

Please sign in to comment.