Skip to content

Commit

Permalink
check whether cwd is malformed before chdir
Browse files Browse the repository at this point in the history
  • Loading branch information
lilnasy committed Oct 9, 2023
1 parent 8ddcad5 commit 850c3c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/astro.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async function main() {
if (process.platform === 'win32') {
const cwd = process.cwd()
const correctedCwd = cwd.slice(0, 1).toUpperCase() + cwd.slice(1)
process.chdir(correctedCwd)
if (correctedCwd !== cwd) process.chdir(correctedCwd)
}

return import('./dist/cli/index.js')
Expand Down

0 comments on commit 850c3c0

Please sign in to comment.