Skip to content

Commit dfd5a13

Browse files
authored
add TrimSpace to output string in GetSSHDaemonPort to prevent string-to-int conversion errors (#3187)
Signed-off-by: Adam D. Cornett <[email protected]>
1 parent 9586921 commit dfd5a13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/networking/netutil/netutil.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ func GetSSHDaemonPort(cut *provider.Container) (string, error) {
8585
return "", fmt.Errorf("failed to execute command %s on %s, err: %v", findSSHDaemonPort, cut, err)
8686
}
8787

88-
return outStr, nil
88+
return strings.TrimSpace(outStr), nil
8989
}

0 commit comments

Comments
 (0)