Commit 7986ff1 1 parent 02d7414 commit 7986ff1 Copy full SHA for 7986ff1
File tree 1 file changed +6
-2
lines changed
npm_and_yarn/lib/dependabot/npm_and_yarn
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,12 @@ def self.npm_version_numeric(lockfile_content)
23
23
def self . run_yarn_commands ( *commands )
24
24
# We never want to execute postinstall scripts
25
25
SharedHelpers . run_shell_command ( "yarn config set enableScripts false" )
26
- SharedHelpers . run_shell_command ( "yarn config set httpProxy #{ ENV . fetch ( 'HTTP_PROXY' , '' ) } " )
27
- SharedHelpers . run_shell_command ( "yarn config set httpsProxy #{ ENV . fetch ( 'HTTPS_PROXY' , '' ) } " )
26
+ if ( http_proxy = ENV . fetch ( "HTTP_PROXY" , false ) )
27
+ SharedHelpers . run_shell_command ( "yarn config set httpProxy #{ http_proxy } " )
28
+ end
29
+ if ( https_proxy = ENV . fetch ( "HTTPS_PROXY" , false ) )
30
+ SharedHelpers . run_shell_command ( "yarn config set httpsProxy #{ https_proxy } " )
31
+ end
28
32
commands . each { |cmd | SharedHelpers . run_shell_command ( cmd ) }
29
33
end
30
34
end
You can’t perform that action at this time.
0 commit comments