diff --git a/src/depot.ts b/src/depot.ts index c912d80..5211280 100644 --- a/src/depot.ts +++ b/src/depot.ts @@ -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])