Skip to content

Commit 24976d4

Browse files
committed
fix: fix question mark in file path problem
1 parent a00c9f1 commit 24976d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: create/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const create = data => {
1111
similarQuestions: JSON.parse(data.similarQuestions).map(q => q.title).join(', '),
1212
description: getDescription(data.content),
1313
};
14-
const dir = getPath(pageData.id, pageData.name);
14+
const dir = getPath(pageData.id, pageData.name.replace(/\?/g, ''));
1515

1616
if (fs.existsSync(dir)) {
1717
console.log(`${chalk.red('file already exists')}: ${chalk.blue(dir)}\n`);

0 commit comments

Comments
 (0)