Skip to content

Commit ed13fde

Browse files
[Fix] Astro relatives dirs (#5709)
Use fileURLToPath to address astro relative directories --------- Co-authored-by: James Daniels <[email protected]>
1 parent 9fd1102 commit ed13fde

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- Addressed an issue preventing Astro applications from being deployed from Windows. (#5709)
12
- Fixed an issue preventing Angular apps using ng-deploy from being emulated or deployed. (#6584)
23
- Warn if a Web Framework is outside a well known version range on deploy/emulate. (#6562)
34
- Use Web Framework's well known version range in `firebase init hosting`. (#6562)

src/frameworks/astro/utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { dirname, join, relative } from "path";
22
import { findDependency } from "../utils";
33
import { gte } from "semver";
4+
import { fileURLToPath } from "url";
45

56
const { dynamicImport } = require(true && "../../dynamicImport");
67

@@ -29,8 +30,8 @@ export async function getConfig(cwd: string) {
2930
config = astroConfig;
3031
}
3132
return {
32-
outDir: relative(cwd, config.outDir.pathname),
33-
publicDir: relative(cwd, config.publicDir.pathname),
33+
outDir: relative(cwd, fileURLToPath(config.outDir)),
34+
publicDir: relative(cwd, fileURLToPath(config.publicDir)),
3435
output: config.output,
3536
adapter: config.adapter,
3637
};

0 commit comments

Comments
 (0)