Skip to content

Commit

Permalink
Merge branch 'main' into cf-sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderniebuhr authored Oct 9, 2023
2 parents e3afcb5 + 7ea27f6 commit 35f8a29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/large-clouds-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixed an issue on Windows where lowercase drive letters in current working directory led to missing scripts and styles.
7 changes: 7 additions & 0 deletions packages/astro/astro.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ async function main() {
}
}

// windows drive letters can sometimes be lowercase, which vite cannot process
if (process.platform === 'win32') {
const cwd = process.cwd();
const correctedCwd = cwd.slice(0, 1).toUpperCase() + cwd.slice(1);
if (correctedCwd !== cwd) process.chdir(correctedCwd);
}

return import('./dist/cli/index.js')
.then(({ cli }) => cli(process.argv))
.catch((error) => {
Expand Down

0 comments on commit 35f8a29

Please sign in to comment.