Skip to content

Commit 6b0f13e

Browse files
committed
Remove check for relative path in resolveFullImage
1 parent 65a928b commit 6b0f13e

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
@@ -428,14 +428,14 @@ async function resolveImageName(
428428
config: Config,
429429
image: string
430430
): Promise<string> {
431-
// If the image is a relative path return it immediately
432-
if (image.startsWith(".")) {
431+
let url: URL;
432+
try {
433+
url = new URL(`http://${image}`);
434+
} catch (_) {
433435
return image;
434436
}
435437

436-
const registry = getCloudflareContainerRegistry();
437-
const url = new URL(`http://${image}`);
438-
if (url.hostname !== registry) {
438+
if (url.hostname !== getCloudflareContainerRegistry()) {
439439
return image;
440440
}
441441

0 commit comments

Comments
 (0)