fix: tmpdir error msg truncates logfile

This commit is contained in:
Asif Bacchus 2019-05-25 02:31:03 -06:00
parent 50c5ee321e
commit e63383012f

View File

@ -321,7 +321,7 @@ printf "${cyan}[%s] -- [INFO] ${yellow}%s${cyan} imported --${norm}\n" \
printf "${cyan}[%s] -- [INFO] Dumping SQL databases --${norm}\n" \ printf "${cyan}[%s] -- [INFO] Dumping SQL databases --${norm}\n" \
"$(stamp)" >> "$logFile" "$(stamp)" >> "$logFile"
# create temporary directory to dump files before borg backup # create temporary directory to dump files before borg backup
if ! sqlDumpDir=$( mktemp -d 2>"$logFile"); then if ! sqlDumpDir=$( mktemp -d 2>>"$logFile"); then
exitError 111 "Could not create temporary directory to dump SQL files" exitError 111 "Could not create temporary directory to dump SQL files"
fi fi
printf "${cyan}[%s] -- [INFO] SQL dump files will be temporarily stored in:" \ printf "${cyan}[%s] -- [INFO] SQL dump files will be temporarily stored in:" \