From 1fdcfe3e0686442052787e28ca8830dac7a38c30 Mon Sep 17 00:00:00 2001 From: Jacob M-G Evans <27247160+JacobMGEvans@users.noreply.github.com> Date: Tue, 28 Dec 2021 14:01:11 -0600 Subject: [PATCH] Subfolder Relative Pathing Fix (#157) * Relative pathing Fix - filename from args didnt handle relative pathing - added a path.relative using cwd to filepath arg * Create early-games-buy.md --- .changeset/early-games-buy.md | 7 +++++++ packages/wrangler/src/index.tsx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/early-games-buy.md diff --git a/.changeset/early-games-buy.md b/.changeset/early-games-buy.md new file mode 100644 index 000000000000..e7d56a71a38c --- /dev/null +++ b/.changeset/early-games-buy.md @@ -0,0 +1,7 @@ +--- +"wrangler": patch +--- + +Subfolder Relative Pathing Fix issue #147 +The filename from args didn't handle relative paths passed in from users with scripts in subfolders. +To handle the subfolder pathing a path.relative using cwd() to user input filepath to the filepath variable passed into Dev diff --git a/packages/wrangler/src/index.tsx b/packages/wrangler/src/index.tsx index b3e31f390b4b..5dfa9db625f8 100644 --- a/packages/wrangler/src/index.tsx +++ b/packages/wrangler/src/index.tsx @@ -502,7 +502,7 @@ export async function main(argv: string[]): Promise { render(