Skip to content

Commit f946c86

Browse files
authored
fix(create-vite): target dir contains special characters (#17549)
1 parent 7c06ef0 commit f946c86

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/create-vite/src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,9 @@ async function init() {
449449

450450
const [command, ...args] = fullCustomCommand.split(' ')
451451
// we replace TARGET_DIR here because targetDir may include a space
452-
const replacedArgs = args.map((arg) => arg.replace('TARGET_DIR', targetDir))
452+
const replacedArgs = args.map((arg) =>
453+
arg.replace('TARGET_DIR', () => targetDir),
454+
)
453455
const { status } = spawn.sync(command, replacedArgs, {
454456
stdio: 'inherit',
455457
})

0 commit comments

Comments
 (0)