From 8fdbd82fbb7a632f96cf548f6733a1a186060d27 Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Thu, 15 Jun 2023 10:29:25 +0200 Subject: [PATCH] revert: "fix: use yarn instead of npx with yarn.lock (#914)" This reverts commit e08da4966cec4d8f99cf72b09d3362aae2c5391c. --- dist/index.js | 10 ++++------ index.js | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/dist/index.js b/dist/index.js index b333a0be2..9c46b946e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -74457,8 +74457,6 @@ const useYarn = () => fs.existsSync(yarnFilename) const usePnpm = () => fs.existsSync(pnpmLockFilename) const useNpm = () => fs.existsSync(packageLockFilename) -const runPrefix = useYarn() ? 'yarn' : 'npx' - const lockHash = () => { const lockFilename = useYarn() ? yarnFilename @@ -74637,9 +74635,9 @@ const listCypressBinaries = () => { } core.exportVariable('CYPRESS_CACHE_FOLDER', CYPRESS_CACHE_FOLDER) - return io.which(runPrefix, true).then((runPath) => { + return io.which('npx', true).then((npxPath) => { return exec.exec( - quote(runPath), + quote(npxPath), ['cypress', 'cache', 'list'], cypressCommandOptions ) @@ -74656,9 +74654,9 @@ const verifyCypressBinary = () => { } core.exportVariable('CYPRESS_CACHE_FOLDER', CYPRESS_CACHE_FOLDER) - return io.which(runPrefix, true).then((runPath) => { + return io.which('npx', true).then((npxPath) => { return exec.exec( - quote(runPath), + quote(npxPath), ['cypress', 'verify'], cypressCommandOptions ) diff --git a/index.js b/index.js index 529024748..81311a294 100644 --- a/index.js +++ b/index.js @@ -106,8 +106,6 @@ const useYarn = () => fs.existsSync(yarnFilename) const usePnpm = () => fs.existsSync(pnpmLockFilename) const useNpm = () => fs.existsSync(packageLockFilename) -const runPrefix = useYarn() ? 'yarn' : 'npx' - const lockHash = () => { const lockFilename = useYarn() ? yarnFilename @@ -286,9 +284,9 @@ const listCypressBinaries = () => { } core.exportVariable('CYPRESS_CACHE_FOLDER', CYPRESS_CACHE_FOLDER) - return io.which(runPrefix, true).then((runPath) => { + return io.which('npx', true).then((npxPath) => { return exec.exec( - quote(runPath), + quote(npxPath), ['cypress', 'cache', 'list'], cypressCommandOptions ) @@ -305,9 +303,9 @@ const verifyCypressBinary = () => { } core.exportVariable('CYPRESS_CACHE_FOLDER', CYPRESS_CACHE_FOLDER) - return io.which(runPrefix, true).then((runPath) => { + return io.which('npx', true).then((npxPath) => { return exec.exec( - quote(runPath), + quote(npxPath), ['cypress', 'verify'], cypressCommandOptions )