Skip to content

Commit

Permalink
Set packageManager accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
einSelbst committed Feb 16, 2022
1 parent 96b00d2 commit 24f7619
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ async function run(octokit, context, token) {
let packageManager = `npm`;
let installScript = `npm install`;
if (yarnLock) {
installScript = packageManager = `yarn --frozen-lockfile`;
installScript = `yarn --frozen-lockfile`;
packageManager = `yarn`
}
else if (pnpmLock) {
installScript = `pnpm install --frozen-lockfile`;
packageManager = `pnpm`
}
else if (packageLock) {
installScript = `npm ci`;
Expand Down Expand Up @@ -125,10 +127,12 @@ async function run(octokit, context, token) {
packageLock = await fileExists(path.resolve(cwd, 'package-lock.json'));

if (yarnLock) {
installScript = packageManager = `yarn --frozen-lockfile`;
installScript = `yarn --frozen-lockfile`;
packageManager = `yarn`
}
else if (pnpmLock) {
installScript = `pnpm install --frozen-lockfile`;
packageManager = `pnpm`
}
else if (packageLock) {
installScript = `npm ci`;
Expand Down

0 comments on commit 24f7619

Please sign in to comment.