Skip to content

Commit

Permalink
fix: should replace all LF string (#2211)
Browse files Browse the repository at this point in the history
Signed-off-by: Cluas <Cluas@live.cn>
  • Loading branch information
Cluas authored May 6, 2023
1 parent dd72089 commit 150c4cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/ssh/sshcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ func (s *SSH) CmdToString(host net.IP, env map[string]string, cmd, split string)
return str, err
}
if data != nil {
str = strings.ReplaceAll(str, "\r", split)
str = strings.ReplaceAll(str, "\r\n", split)
str = strings.ReplaceAll(str, "\n", split)
return str, nil
Expand Down

0 comments on commit 150c4cb

Please sign in to comment.