redirect users about missing publisher
This commit is contained in:
parent
5e4a865fa6
commit
fae9b7d125
1 changed files with 2 additions and 2 deletions
|
@ -4,11 +4,11 @@ const nameRegex = /^[a-z0-9][a-z0-9\-]*$/i;
|
|||
|
||||
export function validatePublisher(publisher: string): void {
|
||||
if (!publisher) {
|
||||
throw new Error(`Missing publisher name`);
|
||||
throw new Error(`Missing publisher name. Learn more: https://code.visualstudio.com/docs/extensions/publish-extension#_publishing-extensions`);
|
||||
}
|
||||
|
||||
if (!nameRegex.test(publisher)) {
|
||||
throw new Error(`Invalid publisher name '${publisher}'. Expected the identifier of a publisher, not its human-friendly name.`);
|
||||
throw new Error(`Invalid publisher name '${publisher}'. Expected the identifier of a publisher, not its human-friendly name. Learn more: https://code.visualstudio.com/docs/extensions/publish-extension#_publishing-extensions`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue