Skip to content

Commit

Permalink
fix: correctly warn if not in nuxt project
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jan 6, 2025
1 parent 844d870 commit 65eb750
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async function ensureNuxtProject(args: { global: boolean, dir: string }) {
}
const dir = resolve(args.dir)
const nuxtConfig = await loadNuxtConfig({ cwd: dir })
if (!nuxtConfig) {
if (!nuxtConfig || !nuxtConfig._layers[0]?.configFile) {
consola.error('You are not in a Nuxt project.')
consola.info('You can try specifying a directory or by using the `--global` flag to configure telemetry for your machine.')
process.exit()
Expand Down

0 comments on commit 65eb750

Please sign in to comment.