Skip to content

Commit

Permalink
fix(ci): debug we have the right permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Dec 17, 2022
1 parent 0df1ce5 commit 93def4e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/core/src/unlighthouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,19 @@ export const createUnlighthouse = async (userConfig: UserConfig, provider?: Prov
$site.hostname.replace(':', '꞉'),
runtimeSettings.configCacheKey || '',
)

try {
await fs.mkdir(join(resolvedConfig.root, resolvedConfig.outputPath), { recursive: true })
} catch (e) {
logger.error(`Failed to create output directory. Please check unlighthouse has permissions to: ${resolvedConfig.outputPath}`, e)
}

try {
await fs.mkdir(outputPath, { recursive: true })
} catch (e) {
logger.error(`Failed to create output directory. Please check unlighthouse has permission to create files and folders in: ${resolvedConfig.outputPath}`, e)
}

if (provider?.name === 'ci')
outputPath = join(resolvedConfig.root, resolvedConfig.outputPath)

Expand Down

0 comments on commit 93def4e

Please sign in to comment.