Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored May 10, 2024
1 parent 52893f0 commit 2d9e5cd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/commands/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,20 @@ export default defineCommand({
)

if (ctx.args.dotenv !== undefined) {
const fileName = ctx.args.dotenv || '.env'
const fileName = ctx.args.dotenv || '.env'

const envExists = existsSync(resolve(cwd, fileName))
const envExists = existsSync(resolve(cwd, fileName))

if (envExists) {
consola.info(
`Loading \`${fileName}\`. This will not be loaded when running the server in production.`,
)
if (envExists) {
consola.info(
`Loading \`${fileName}\`. This will not be loaded when running the server in production.`,
)

await setupDotenv({ cwd, fileName })
} else {
consola.error(`Cannot find \`${fileName}\`.`)
process.exit(1)
}
await setupDotenv({ cwd, fileName })
} else {
consola.error(`Cannot find \`${fileName}\`.`)
process.exit(1)
}
}

consola.info(`Starting preview command: \`${nitroJSON.commands.preview}\``)
Expand Down

0 comments on commit 2d9e5cd

Please sign in to comment.