-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle missing scheme #24
Comments
This should be fixed here https://github.com/WeiChiaChang/stacks-cli/pull/25/files#diff-22d5d2b57c69d2e1ac054c4d0f744ff1R87 👍 |
That fixes the silent exit. 👍 It would be great if it would also specifically handle the missing scheme in a more friendly way, for example by defaulting to |
Yes, using https://github.com/epoberezkin/ajv#formats ! |
Why use an entire validation library? if(inputstr.indexOf("http://") < 0 && inputstr.indexOf("https://") < 0){
console.log("No scheme found, defaulting to http");
inputstr = "http://" + inputstr;
} That's all you need. |
Send a PR @dospunk ! |
Entering a URL without a scheme causes the process to exit silently:
Would it be reasonable to assume
https://
orhttps://
if the entered URL lacks a scheme?The text was updated successfully, but these errors were encountered: