Skip to content
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

Merged
merged 2 commits into from
Jan 24, 2016
Merged

when strictSsl is false set GIT_SSL_NO_VERIFY=true for git command #2137

merged 2 commits into from
Jan 24, 2016

Conversation

pwielgolaski
Copy link
Contributor

Solves #2129

@pwielgolaski
Copy link
Contributor Author

it seems to failing on travis, but it is not related to the change

@faceleg
Copy link
Member

faceleg commented Jan 14, 2016

I've restarted the build, let's cross our fingers.

@faceleg
Copy link
Member

faceleg commented Jan 14, 2016

The board is green!

@faceleg
Copy link
Member

faceleg commented Jan 14, 2016

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';
}
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@pwielgolaski
Copy link
Contributor Author

What do you say now, can it go into master?

@sheerun
Copy link
Contributor

sheerun commented Jan 23, 2016

No, because you still handle only one case. You need to drop if, of add else.

@pwielgolaski
Copy link
Contributor Author

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.
If you disagree, I can remove the condition.

@sheerun
Copy link
Contributor

sheerun commented Jan 23, 2016

We should be consistent, so just like in GIT_TEMPLATE_DIR case, we'll force the value.

@pwielgolaski
Copy link
Contributor Author

Ok, I changed it as you proposed.

sheerun added a commit that referenced this pull request Jan 24, 2016
when strictSsl is false set GIT_SSL_NO_VERIFY=true for git command
@sheerun sheerun merged commit d63047b into bower:master Jan 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants