diff --git a/dist/index.js b/dist/index.js index 9c46b946e..b333a0be2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -74457,6 +74457,8 @@ 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 @@ -74635,9 +74637,9 @@ const listCypressBinaries = () => { } core.exportVariable('CYPRESS_CACHE_FOLDER', CYPRESS_CACHE_FOLDER) - return io.which('npx', true).then((npxPath) => { + return io.which(runPrefix, true).then((runPath) => { return exec.exec( - quote(npxPath), + quote(runPath), ['cypress', 'cache', 'list'], cypressCommandOptions ) @@ -74654,9 +74656,9 @@ const verifyCypressBinary = () => { } core.exportVariable('CYPRESS_CACHE_FOLDER', CYPRESS_CACHE_FOLDER) - return io.which('npx', true).then((npxPath) => { + return io.which(runPrefix, true).then((runPath) => { return exec.exec( - quote(npxPath), + quote(runPath), ['cypress', 'verify'], cypressCommandOptions ) diff --git a/index.js b/index.js index 81311a294..529024748 100644 --- a/index.js +++ b/index.js @@ -106,6 +106,8 @@ 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 @@ -284,9 +286,9 @@ const listCypressBinaries = () => { } core.exportVariable('CYPRESS_CACHE_FOLDER', CYPRESS_CACHE_FOLDER) - return io.which('npx', true).then((npxPath) => { + return io.which(runPrefix, true).then((runPath) => { return exec.exec( - quote(npxPath), + quote(runPath), ['cypress', 'cache', 'list'], cypressCommandOptions ) @@ -303,9 +305,9 @@ const verifyCypressBinary = () => { } core.exportVariable('CYPRESS_CACHE_FOLDER', CYPRESS_CACHE_FOLDER) - return io.which('npx', true).then((npxPath) => { + return io.which(runPrefix, true).then((runPath) => { return exec.exec( - quote(npxPath), + quote(runPath), ['cypress', 'verify'], cypressCommandOptions )