Skip to content

Commit

Permalink
fix: linux shell should be replace \r\n to \n (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeessy2 committed Dec 7, 2023
1 parent f8ba433 commit 286a132
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func backup(backupConf entity.BackupConfig, encryptKey string, s3Conf entity.S3C
if runtime.GOOS == "windows" {
shellName = time.Now().Format("shell-"+util.FileNameFormatStr+"-") + "backup.bat"
} else {
shellString = strings.ReplaceAll(shellString, "\r\n", "\n") // windows to linux
shellName = time.Now().Format("shell-"+util.FileNameFormatStr+"-") + "backup.sh"
}

Expand Down

0 comments on commit 286a132

Please sign in to comment.