Skip to content

Commit

Permalink
Merge pull request #1073 from HarshCasper/main
Browse files Browse the repository at this point in the history
Fixed Code Quality Issues
  • Loading branch information
jromero authored Feb 21, 2021
2 parents 3e4b035 + 764257c commit 0c84b4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ func (c *Client) processBuildpacks(ctx context.Context, builderImage imgutil.Ima
relativeBaseDir = opts.ProjectDescriptorBaseDir

for _, bp := range opts.ProjectDescriptor.Build.Buildpacks {
if len(bp.URI) == 0 {
if bp.URI == "" {
declaredBPs = append(declaredBPs, fmt.Sprintf("%s@%s", bp.ID, bp.Version))
} else {
declaredBPs = append(declaredBPs, bp.URI)
Expand Down
9 changes: 3 additions & 6 deletions internal/build/phase_config_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,15 @@ func WithLogPrefix(prefix string) PhaseConfigProviderOperation {
func WithLifecycleProxy(lifecycleExec *LifecycleExecution) PhaseConfigProviderOperation {
return func(provider *PhaseConfigProvider) {
if lifecycleExec.opts.HTTPProxy != "" {
provider.ctrConf.Env = append(provider.ctrConf.Env, "HTTP_PROXY="+lifecycleExec.opts.HTTPProxy)
provider.ctrConf.Env = append(provider.ctrConf.Env, "http_proxy="+lifecycleExec.opts.HTTPProxy)
provider.ctrConf.Env = append(provider.ctrConf.Env, "HTTP_PROXY="+lifecycleExec.opts.HTTPProxy, "http_proxy="+lifecycleExec.opts.HTTPProxy)
}

if lifecycleExec.opts.HTTPSProxy != "" {
provider.ctrConf.Env = append(provider.ctrConf.Env, "HTTPS_PROXY="+lifecycleExec.opts.HTTPSProxy)
provider.ctrConf.Env = append(provider.ctrConf.Env, "https_proxy="+lifecycleExec.opts.HTTPSProxy)
provider.ctrConf.Env = append(provider.ctrConf.Env, "HTTPS_PROXY="+lifecycleExec.opts.HTTPSProxy, "https_proxy="+lifecycleExec.opts.HTTPSProxy)
}

if lifecycleExec.opts.NoProxy != "" {
provider.ctrConf.Env = append(provider.ctrConf.Env, "NO_PROXY="+lifecycleExec.opts.NoProxy)
provider.ctrConf.Env = append(provider.ctrConf.Env, "no_proxy="+lifecycleExec.opts.NoProxy)
provider.ctrConf.Env = append(provider.ctrConf.Env, "NO_PROXY="+lifecycleExec.opts.NoProxy, "no_proxy="+lifecycleExec.opts.NoProxy)
}
}
}
Expand Down

0 comments on commit 0c84b4a

Please sign in to comment.