Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit 4eae86d

Browse files
Tim Etchellsjopit
authored andcommitted
Revert "Allow template sources to use file scheme (#223)" (#240)
This reverts commit 94fd909. Does not work due to eclipse-archived/codewind#668 Signed-off-by: Tim Etchells <timetchells@ibm.com>
1 parent 2551a59 commit 4eae86d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

dev/src/command/connection/ManageTemplateReposCmd.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,8 @@ function validateRepoInput(input: string): string | undefined {
236236
catch (err) {
237237
// not a url
238238
}
239-
240-
if (!asUrl) {
241-
return "The repository URL must be a valid URL.";
242-
}
243-
else if (!(asUrl.protocol.startsWith("http") || asUrl.protocol.startsWith("file"))) {
244-
return "The repository URL must be a valid http(s) or file URL.";
239+
if (!asUrl || !asUrl.host || !asUrl.protocol.startsWith("http")) {
240+
return "The repository URL must be a valid http(s) URL.";
245241
}
246242
return undefined;
247243
}

0 commit comments

Comments
 (0)