Skip to content

Commit

Permalink
fix: use yarn instead of npx with yarn.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcC399 committed May 30, 2023
1 parent 307a235 commit 8af941e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
13 changes: 9 additions & 4 deletions dist/index.js
Expand Up @@ -74457,6 +74457,11 @@ const useYarn = () => fs.existsSync(yarnFilename)
const usePnpm = () => fs.existsSync(pnpmLockFilename)
const useNpm = () => fs.existsSync(packageLockFilename)

let runPrefix = 'npx'
if (useYarn()) {
runPrefix = 'yarn'
}

const lockHash = () => {
const lockFilename = useYarn()
? yarnFilename
Expand Down Expand Up @@ -74635,9 +74640,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
)
Expand All @@ -74654,9 +74659,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
)
Expand Down
13 changes: 9 additions & 4 deletions index.js
Expand Up @@ -106,6 +106,11 @@ const useYarn = () => fs.existsSync(yarnFilename)
const usePnpm = () => fs.existsSync(pnpmLockFilename)
const useNpm = () => fs.existsSync(packageLockFilename)

let runPrefix = 'npx'
if (useYarn()) {
runPrefix = 'yarn'
}

const lockHash = () => {
const lockFilename = useYarn()
? yarnFilename
Expand Down Expand Up @@ -284,9 +289,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
)
Expand All @@ -303,9 +308,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
)
Expand Down

0 comments on commit 8af941e

Please sign in to comment.