Skip to content

Commit 4cc49d4

Browse files
authored
Relaxed repo URI validation. (#5698)
* Relaxed repo URI validation. * Added changelog entry.
1 parent cfad0cc commit 4cc49d4

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Relaxed repo URI validation in ext:dev:publish (#5698).

src/extensions/extensionsHelper.ts

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -604,33 +604,11 @@ export async function publishExtensionVersionFromRemoteRepo(args: {
604604
throw new FirebaseError("Repo URI is required but not currently set.");
605605
}
606606
}
607-
if (extension?.repoUri && extension.repoUri !== repoUri) {
608-
throw new FirebaseError(
609-
`Repo URI '${clc.bold(args.repoUri)}' does not match repo URI '${clc.bold(
610-
extension.repoUri!
611-
)}' already associated with Extension ${clc.bold(extensionRef)}. Repo URI cannot be changed.`
612-
);
613-
}
614-
if (!extension?.repoUri) {
615-
logger.info(
616-
`\n${clc.red("Warning:")} You are about to associate repo URI ${clc.bold(
617-
repoUri
618-
)} with Extension ${clc.bold(
619-
extensionRef
620-
)}. This cannot be changed. All future verifiable versions must be published from this repo. ` +
621-
`You can continue publishing unverifiable versions from local source.`
622-
);
623-
const confirmed = await confirm({
624-
nonInteractive: args.nonInteractive,
625-
force: args.force,
626-
default: false,
627-
});
628-
if (!confirmed) {
629-
return;
630-
}
631-
} else {
607+
if (extension?.repoUri) {
632608
logger.info(
633-
`Extension ${clc.bold(extensionRef)} is published from ${clc.bold(extension?.repoUri)}.`
609+
`Extension ${clc.bold(extensionRef)} is published from ${clc.bold(
610+
extension?.repoUri
611+
)}. Use --repo to change this repo.`
634612
);
635613
}
636614

0 commit comments

Comments
 (0)