Skip to content

Commit 5cb729c

Browse files
fix: Set correct command in hexo prebuild (#158)
2 parents 5a1a4fc + fd62874 commit 5cb729c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/presets/custom/hexo/deliver/prebuild.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ async function prebuild() {
2121
outDir = attributeMatch[1].trim().replace(/["']/g, '');
2222
}
2323

24-
await exec(`${packageManager} hexo generate`, 'Hexo', true);
24+
const command = packageManager === 'npm' ? 'npx' : packageManager;
25+
await exec(`${command} hexo generate`, 'Hexo', true);
2526

2627
// move files to vulcan default path
2728
copyDirectory(outDir, newOutDir);

0 commit comments

Comments
 (0)