Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit 44b4af8

Browse files
committed
Added command line switch --no-backup to box database import command.
1 parent 116cbc6 commit 44b4af8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

commands/database

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,12 @@ function database_import() {
156156

157157
fi
158158

159-
database_backup "${basefile}.bak"
160-
161-
if [ $? -ne 0 ]; then
162-
output "Error when backing up to ${basefile}.bak"
163-
return 4
159+
if [ ! $(has_arg --no-backup) ]; then
160+
database_backup "${basefile}.bak"
161+
if [ $? -ne 0 ]; then
162+
output "Error when backing up to ${basefile}.bak"
163+
return 4
164+
fi
164165
fi
165166

166167
output "Dropping any prior tables"

0 commit comments

Comments
 (0)