-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
when strictSsl is false set GIT_SSL_NO_VERIFY=true for git command #2137
Conversation
it seems to failing on travis, but it is not related to the change |
I've restarted the build, let's cross our fingers. |
The board is green! |
OK I'll try to merge this in later today! |
@@ -26,6 +26,9 @@ function GitResolver(decEndpoint, config, logger) { | |||
// anyway | |||
mkdirp.sync(config.storage.empty); | |||
process.env.GIT_TEMPLATE_DIR = config.storage.empty; | |||
if (!config.strictSsl) { | |||
process.env.GIT_SSL_NO_VERIFY = 'true'; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need "else" part as well to support api interface.. Currently in API interface it's possible to run multiple bower commands in one process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I dont get what should be in "else" part.
How is it different from process.env.GIT_TEMPLATE_DIR
line above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GIT_TEMPLATE_DIR is set every time (if config.storage.empty is false or true), and GIT_SSL_NO_VERIFY only if config.strictSsl is false. You don't handle the case when config.strictSsl is true.
What do you say now, can it go into master? |
No, because you still handle only one case. You need to drop if, of add else. |
Let me explain my motivation behind 'if', I think that if someone has already defined explictly the variable, we should not change it and respect it. |
We should be consistent, so just like in GIT_TEMPLATE_DIR case, we'll force the value. |
Ok, I changed it as you proposed. |
when strictSsl is false set GIT_SSL_NO_VERIFY=true for git command
Solves #2129