Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Jul 31, 2024
1 parent b3fe815 commit 9786536
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const getPackageManagerForInstall = async (options: Options, pkgFile: string) =>
// when packageManager is set to staticRegistry, we need to infer the package manager from lock files
if (options.packageManager === 'staticRegistry') determinePackageManager({ ...options, packageManager: undefined })
else if (options.packageManager !== 'npm') return options.packageManager
const cwd = options.cwd ?? pkgFile ? `${pkgFile}/..` : process.cwd()
const cwd = (options.cwd ?? pkgFile) ? `${pkgFile}/..` : process.cwd()
const pnpmDetected = await exists(path.join(cwd, 'pnpm-lock.yaml'))
return pnpmDetected ? 'pnpm' : 'npm'
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/queryVersions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function queryVersions(packageMap: Index<VersionSpec>, options: Options =
versionResult.version =
!isGithubDependency && npmAlias && versionResult?.version
? createNpmAlias(name, versionResult.version)
: versionResult?.version ?? null
: (versionResult?.version ?? null)
} catch (err: any) {
const errorMessage = err ? (err.message || err).toString() : ''
if (errorMessage.match(/E404|ENOTFOUND|404 Not Found/i)) {
Expand Down

0 comments on commit 9786536

Please sign in to comment.