From f42778cf59d2bdaa8a85d4286253bc6b490f7a48 Mon Sep 17 00:00:00 2001 From: Stanislav Zhuk Date: Wed, 5 Jun 2024 21:13:07 +0300 Subject: [PATCH] Fix check for lockfiles depth (#52) --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 8cdb47b..ba25a5b 100644 --- a/action.yml +++ b/action.yml @@ -35,17 +35,17 @@ runs: VERSION="latest" fi echo "PACKAGE_MANAGER=$PACKAGE_MANAGER" >> $GITHUB_ENV - elif [ $(find "." -name "pnpm-lock.yaml") ]; then + elif [ $(find "." -maxdepth 1 -name "pnpm-lock.yaml") ]; then echo "PACKAGE_MANAGER=pnpm" >> $GITHUB_ENV echo "LOCKFILE=pnpm-lock.yaml" >> $GITHUB_ENV - elif [ $(find "." -name "yarn.lock") ]; then + elif [ $(find "." -maxdepth 1 -name "yarn.lock") ]; then echo "PACKAGE_MANAGER=yarn" >> $GITHUB_ENV echo "LOCKFILE=yarn.lock" >> $GITHUB_ENV - elif [ $(find "." -name "package-lock.json") ]; then + elif [ $(find "." -maxdepth 1 -name "package-lock.json") ]; then VERSION="latest" echo "PACKAGE_MANAGER=npm" >> $GITHUB_ENV echo "LOCKFILE=package-lock.json" >> $GITHUB_ENV - elif [ $(find "." -name "bun.lockb") ]; then + elif [ $(find "." -maxdepth 1 -name "bun.lockb") ]; then VERSION="latest" echo "PACKAGE_MANAGER=bun" >> $GITHUB_ENV echo "LOCKFILE=bun.lockb" >> $GITHUB_ENV