Skip to content

Commit

Permalink
revert: "fix: use yarn instead of npx with yarn.lock (cypress-io#914)"
Browse files Browse the repository at this point in the history
This reverts commit e08da49.
  • Loading branch information
MikeMcC399 committed Jun 15, 2023
1 parent e08da49 commit 8fdbd82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
10 changes: 4 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)
Expand All @@ -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
)
Expand Down
10 changes: 4 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)
Expand All @@ -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
)
Expand Down

0 comments on commit 8fdbd82

Please sign in to comment.