We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 327b709 commit b036c0dCopy full SHA for b036c0d
src/install-pnpm/run.ts
@@ -46,7 +46,12 @@ async function readTarget(opts: {
46
let packageManager
47
48
if (GITHUB_WORKSPACE) {
49
- ({ packageManager } = JSON.parse(await readFile(path.join(GITHUB_WORKSPACE, packageJsonFile), 'utf8')))
+ try {
50
+ ({ packageManager } = JSON.parse(await readFile(path.join(GITHUB_WORKSPACE, packageJsonFile), 'utf8')))
51
+ } catch (error) {
52
+ // Swallow error if package.json doesn't exist in root
53
+ if (error.code !== 'ENOENT') throw error
54
+ }
55
}
56
57
if (version) {
0 commit comments