Skip to content

Commit

Permalink
defense against message being null
Browse files Browse the repository at this point in the history
  • Loading branch information
kylegalbraith committed Jul 10, 2023
1 parent 7ecb680 commit ec08d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/depot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export async function build(inputs: Inputs) {
env: {...process.env, ...(token ? {DEPOT_TOKEN: token} : {})},
})
} catch (err) {
const lintFailed = inputs.lint && (err as Error).message.includes('linting failed')
const lintFailed = inputs.lint && (err as Error).message?.includes('linting failed')
if (inputs.buildxFallback && !lintFailed) {
core.warning(`falling back to buildx: ${err}`)
await execBuild('docker', ['buildx', 'build', ...buildxArgs, resolvedContext])
Expand Down

0 comments on commit ec08d02

Please sign in to comment.