Skip to content

Commit 6da9a5f

Browse files
committedApr 6, 2019
feat($core): emit warning if the source directory doesn't exist (close: #1521)
1 parent 74887c5 commit 6da9a5f

File tree

1 file changed

+3
-0
lines changed
  • packages/@vuepress/core/lib/node

1 file changed

+3
-0
lines changed
 

‎packages/@vuepress/core/lib/node/App.js

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ module.exports = class App {
4141
this.options = options
4242
this.sourceDir = this.options.sourceDir || path.join(__dirname, 'docs.fallback')
4343
logger.debug('sourceDir', this.sourceDir)
44+
if (!fs.existsSync(this.sourceDir)) {
45+
logger.warn(`Source directory doesn't exist: ${chalk.yellow(this.sourceDir)}`)
46+
}
4447

4548
const { tempPath, writeTemp } = createTemp(options.temp)
4649
this.tempPath = tempPath

0 commit comments

Comments
 (0)
Please sign in to comment.