Skip to content

Commit

Permalink
detect .yarn as well
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Oct 28, 2021
1 parent 18f6e17 commit cf2fa6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ async function getYarnDependencies(cwd: string, packagedDependencies?: string[])
}

export async function detectYarn(cwd: string) {
for (const file of ['yarn.lock', '.yarnrc', '.yarnrc.yaml', '.pnp.cjs']) {
if (await exists(path.join(cwd, file))) {
for (const name of ['yarn.lock', '.yarnrc', '.yarnrc.yaml', '.pnp.cjs', '.yarn']) {
if (await exists(path.join(cwd, name))) {
if (!process.env['VSCE_TESTS']) {
log.info(
`Detected presence of ${file}. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).`
`Detected presence of ${name}. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).`
);
}
return true;
Expand Down

0 comments on commit cf2fa6a

Please sign in to comment.