From d25a56524bb3265019609ebb2b808d8242b68a1f Mon Sep 17 00:00:00 2001 From: Kaspar Lyngsie Date: Thu, 14 Dec 2023 11:02:30 -0800 Subject: [PATCH] fix: Fixing cache load step breaking when no lock file is detected (#200) Co-authored-by: Eric Ribeiro --- src/scripts/packages/determine-lockfile.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scripts/packages/determine-lockfile.sh b/src/scripts/packages/determine-lockfile.sh index 1534215..416e5cd 100644 --- a/src/scripts/packages/determine-lockfile.sh +++ b/src/scripts/packages/determine-lockfile.sh @@ -15,6 +15,9 @@ elif [ -f "npm-shrinkwrap.json" ]; then elif [ -f "yarn.lock" ]; then echo "Found yarn.lock file, assuming lockfile" cp yarn.lock "$TARGET_DIR"/node-project-lockfile +else + echo "Found no lockfile, adding empty one" + touch "$TARGET_DIR"/node-project-lockfile fi cp package.json "$TARGET_DIR"/node-project-package.json