File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -94,14 +94,22 @@ function buildRef(ref: string, labelForOutDir: string) {
9494 try {
9595 const docsWorkspace = docsRelative ? resolve ( worktreePath , docsRelative ) : worktreePath
9696
97- if ( existsSync ( resolve ( docsWorkspace , "package.json" ) ) ) {
98- run ( "pnpm install --frozen-lockfile" , { cwd : docsWorkspace , inherit : true } )
97+ const rootPkg = existsSync ( resolve ( worktreePath , "package.json" ) )
98+ const rootLock = existsSync ( resolve ( worktreePath , "pnpm-lock.yaml" ) )
99+ if ( rootPkg ) {
100+ run ( `pnpm install ${ rootLock ? "--frozen-lockfile" : "--no-frozen-lockfile" } ` , {
101+ cwd : worktreePath ,
102+ inherit : true ,
103+ } )
99104 }
100105
101- if ( existsSync ( resolve ( worktreePath , "package.json" ) ) ) {
102- run ( "pnpm install --frozen-lockfile" , { cwd : worktreePath , inherit : true } )
106+ const docsPkg = existsSync ( resolve ( docsWorkspace , "package.json" ) )
107+ const docsLock = existsSync ( resolve ( docsWorkspace , "pnpm-lock.yaml" ) )
108+ if ( docsPkg && docsLock ) {
109+ run ( "pnpm install --frozen-lockfile" , { cwd : docsWorkspace , inherit : true } )
103110 }
104111
112+
105113 const outDir = resolve ( outputDir , labelForOutDir )
106114 buildDocs ( docsWorkspace , outDir )
107115 } finally {
You can’t perform that action at this time.
0 commit comments