Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use yarn instead of npx with yarn.lock #914

Merged
merged 3 commits into from Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions dist/index.js
Expand Up @@ -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
Expand Down Expand Up @@ -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
)
Expand All @@ -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
)
Expand Down
10 changes: 6 additions & 4 deletions index.js
Expand Up @@ -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
Expand Down Expand Up @@ -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
)
Expand All @@ -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
)
Expand Down