Skip to content

Commit 9651230

Browse files
mischnicijjk
andauthored
tests: Fix immutableAssetToken extraction (#90668)
Fixes this deploy test failure: https://github.com/vercel/next.js/actions/runs/22499483165/attempts/2 The output might be: ``` Building: └ ○ /nested Building: ○ (Static) prerendered as static content Building: ƒ (Dynamic) server-rendered on demand Building: > @ post-build /vercel/path0 Building: > node -e 'console.log("BUILD" + "_ID: " + fs.readFileSync(".next/BUILD_ID") + "\nDEPLOYMENT" + "_ID: " + process.env.NEXT_DEPLOYMENT_ID + "\nIMMUTABLE_ASSET" + "_TOKEN: " + process.env.VERCEL_IMMUTABLE_ASSET_TOKEN)' Building: BUILD_ID: build-TfctsWXpff2fKS Building: DEPLOYMENT_ID: dpl_5Qad8NbhCPWn7QRf5TiCePi58vVi Building: IMMUTABLE_ASSET_TOKEN: undefined Building: Build Completed in /vercel/output [15s] Building: Deploying outputs... Building: Deployment completed ``` Co-authored-by: JJ Kasper <[email protected]>
1 parent 683180b commit 9651230

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/lib/next-modes/next-deploy.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ export class NextDeployInstance extends NextInstance {
144144
`Failed to get immutableAssetToken from logs ${this._cliOutput}`
145145
)
146146
}
147-
this._immutableAssetToken = immutableAssetToken
147+
this._immutableAssetToken =
148+
immutableAssetToken === 'undefined' ? undefined : immutableAssetToken
148149

149150
require('console').log(
150151
`Got buildId: ${this._buildId}, deploymentId: ${this._deploymentId}, immutableAssetToken: ${this._immutableAssetToken}`

0 commit comments

Comments
 (0)