We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d129222 commit d6b0c71Copy full SHA for d6b0c71
vackup
@@ -98,8 +98,16 @@ cmd_import() {
98
docker volume create "$VOLUME_NAME"
99
fi
100
101
-# TODO: check if file exists on host, if it does
102
-# create a option for overwrite and check if that's set
+ if [ ! -r "$FILE_NAME" ]; then
+ echo "Error: Could not find or open tar file $FILE_NAME"
103
+ exit 1
104
+ fi
105
+
106
+ if [ -d "$FILE_NAME" ]; then
107
+ echo "Error: $FILE_NAME is a directory"
108
109
110
111
# TODO: if FILE_NAME starts with / we need to error out
112
# unless we can translate full file paths
113
0 commit comments