Skip to content

Commit 5aca128

Browse files
authored
Update sql-import.sh
lando/lando#2268
1 parent ceda273 commit 5aca128

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/sql-import.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ while (( "$#" )); do
4848
shift
4949
;;
5050
*)
51-
if [[ "$1" = /* ]]; then
52-
FILE="${1//\\//}"
51+
if [[ -z "$FILE" ]]; then
52+
if [[ "$1" = /* ]]; then
53+
FILE="${1//\\//}"
54+
else
55+
FILE="$(pwd)/${1//\\//}"
56+
fi
5357
else
54-
FILE="$(pwd)/${1//\\//}"
58+
DATABASE="$1"
5559
fi
5660
shift
5761
;;

0 commit comments

Comments
 (0)