Skip to content

Commit

Permalink
[Fix] Astro relatives dirs (#5709)
Browse files Browse the repository at this point in the history
Use fileURLToPath to address astro relative directories

---------

Co-authored-by: James Daniels <jamesdaniels@google.com>
  • Loading branch information
Geoffrey-Pliez and jamesdaniels committed Dec 7, 2023
1 parent 9fd1102 commit ed13fde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Addressed an issue preventing Astro applications from being deployed from Windows. (#5709)
- Fixed an issue preventing Angular apps using ng-deploy from being emulated or deployed. (#6584)
- Warn if a Web Framework is outside a well known version range on deploy/emulate. (#6562)
- Use Web Framework's well known version range in `firebase init hosting`. (#6562)
Expand Down
5 changes: 3 additions & 2 deletions src/frameworks/astro/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { dirname, join, relative } from "path";
import { findDependency } from "../utils";
import { gte } from "semver";
import { fileURLToPath } from "url";

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

Expand Down Expand Up @@ -29,8 +30,8 @@ export async function getConfig(cwd: string) {
config = astroConfig;
}
return {
outDir: relative(cwd, config.outDir.pathname),
publicDir: relative(cwd, config.publicDir.pathname),
outDir: relative(cwd, fileURLToPath(config.outDir)),
publicDir: relative(cwd, fileURLToPath(config.publicDir)),
output: config.output,
adapter: config.adapter,
};
Expand Down

0 comments on commit ed13fde

Please sign in to comment.