From 9f99dd2c324efd87c259ce08d7ab1e821cef738b Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Thu, 24 Nov 2022 23:22:27 +0800 Subject: [PATCH] bug fix --- lib/hexo/scaffold.js | 2 +- lib/plugins/console/generate.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hexo/scaffold.js b/lib/hexo/scaffold.js index f1e83c0cf1..c1d59f2aa2 100644 --- a/lib/hexo/scaffold.js +++ b/lib/hexo/scaffold.js @@ -26,7 +26,7 @@ class Scaffold { if (!exist) return []; return listDir(scaffoldDir, { - ignoreFilesRegex: /^_|\/_/ + ignorePattern: /^_|\/_/ }); }).map(item => ({ name: item.substring(0, item.length - extname(item).length), diff --git a/lib/plugins/console/generate.js b/lib/plugins/console/generate.js index a95abb0e15..261ba40132 100644 --- a/lib/plugins/console/generate.js +++ b/lib/plugins/console/generate.js @@ -133,7 +133,7 @@ class Generater { // Check the public folder return stat(publicDir).then(stats => { if (!stats.isDirectory()) { - throw new Error('%s is not a directory', magenta(tildify(publicDir))); + throw new Error(`${magenta(tildify(publicDir))} is not a directory`); } }).catch(err => { // Create public folder if not exists