Skip to content

Commit 30367f5

Browse files
Merge pull request #31 from dlabaj/issue-14
fix: Updated Cli to request that a user defines an output directory.
2 parents dd3e769 + a720b87 commit 30367f5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cli/cli.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ program.command('build').action(async () => {
6666
)
6767
return
6868
}
69+
70+
if (!config.outputDir) {
71+
console.error("No outputDir found in config file, an output directory must be defined in your config file e.g. 'dist'")
72+
return
73+
}
74+
6975
build({ root: astroRoot, outDir: join(currentDir, config.outputDir) })
7076
})
7177

0 commit comments

Comments
 (0)