Skip to content

Commit 01d4e59

Browse files
committed
Remove check for relative path in resolveFullImage
1 parent fd282c8 commit 01d4e59

File tree

1 file changed

+5
-5
lines changed
  • packages/wrangler/src/cloudchamber

1 file changed

+5
-5
lines changed

packages/wrangler/src/cloudchamber/apply.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -425,14 +425,14 @@ async function resolveImageName(
425425
config: Config,
426426
image: string
427427
): Promise<string> {
428-
// If the image is a relative path return it immediately
429-
if (image.startsWith(".")) {
428+
let url: URL;
429+
try {
430+
url = new URL(`http://${image}`);
431+
} catch (_) {
430432
return image;
431433
}
432434

433-
const registry = getCloudflareContainerRegistry();
434-
const url = new URL(`http://${image}`);
435-
if (url.hostname !== registry) {
435+
if (url.hostname !== getCloudflareContainerRegistry()) {
436436
return image;
437437
}
438438

0 commit comments

Comments
 (0)