Commit 8af767b5 authored by Anderson Leite's avatar Anderson Leite Committed by Tim Neutkens

Refactor readBuildId. (#5720)

parent c870d03a
......@@ -256,8 +256,6 @@ export default class Server {
if (!fs.existsSync(resolve(this.distDir, BUILD_ID_FILE))) {
throw new Error(`Could not find a valid build in the '${this.distDir}' directory! Try building your app with 'next build' before starting the server.`)
}
const buildIdPath = join(this.distDir, BUILD_ID_FILE)
const buildId = fs.readFileSync(buildIdPath, 'utf8')
return buildId.trim()
return fs.readFileSync(join(this.distDir, BUILD_ID_FILE), 'utf8').trim()
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment