Skip to content

Commit 8093a5a

Browse files
committed
fix: excluding copying file if default stack is not found
1 parent 5dddd87 commit 8093a5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/create.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ function main() {
6767
if [ -f "${IMAGES_JSON}" ]; then
6868
# we need to copy images.json for inclusion in the build image
6969
defaultStackPath=$(jq -r '.images[] | select(.name == "default") | .config_dir' "${IMAGES_JSON}")
70-
cp $IMAGES_JSON $ROOT_DIR/$defaultStackPath/images.json
70+
if [ -n "$defaultStackPath" ]; then
71+
cp $IMAGES_JSON "${ROOT_DIR}/${defaultStackPath}/images.json"
72+
fi
7173
fi
7274

7375
# if stack or build argument is provided but not both, then throw an error

0 commit comments

Comments
 (0)