Skip to content

Commit

Permalink
fix(create-vite): target dir contains special characters (#17549)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Jun 23, 2024
1 parent 7c06ef0 commit f946c86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/create-vite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,9 @@ async function init() {

const [command, ...args] = fullCustomCommand.split(' ')
// we replace TARGET_DIR here because targetDir may include a space
const replacedArgs = args.map((arg) => arg.replace('TARGET_DIR', targetDir))
const replacedArgs = args.map((arg) =>
arg.replace('TARGET_DIR', () => targetDir),
)
const { status } = spawn.sync(command, replacedArgs, {
stdio: 'inherit',
})
Expand Down

0 comments on commit f946c86

Please sign in to comment.