Skip to content

Commit 4d443aa

Browse files
committed
fix(v1.0): fix replace
1 parent 6eac7d9 commit 4d443aa

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/sshutil/scp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (ss *SSH) CopyForMD5(host, localFilePath, remoteFilePath, md5 string) bool
3434
}
3535
func (ss *SSH) Md5Sum(host, remoteFilePath string) string {
3636
cmd := fmt.Sprintf("md5sum %s | cut -d\" \" -f1", remoteFilePath)
37-
remoteMD5 := ss.CmdToString(host, cmd)
37+
remoteMD5 := ss.CmdToString(host, cmd, "")
3838
return remoteMD5
3939
}
4040

pkg/sshutil/watch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func (ss *SSH) LoggerFileSize(host, filename string, size int) {
1919
for {
2020
select {
2121
case <-t.C:
22-
length := ss.CmdToString(host, "ls -l "+filename+" | awk '{print $5}'")
22+
length := ss.CmdToString(host, "ls -l "+filename+" | awk '{print $5}'", "")
2323
length = strings.Replace(length, "\n", "", -1)
2424
length = strings.Replace(length, "\r", "", -1)
2525
lengthByte, _ := strconv.Atoi(length)

0 commit comments

Comments
 (0)