summaryrefslogtreecommitdiff
path: root/lib/license/management
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-04-14 17:53:26 +0000
committermo khan <mo.khan@gmail.com>2020-04-14 17:53:26 +0000
commit3fdf2793726ad19d7f654fec0a9a98600d39d48f (patch)
treef57d0fbea6e26f9722e773e8148ca00a4f82817f /lib/license/management
parentdda9e59a4a3ab471001998d0e68d67ab12b4ac69 (diff)
parentabc83e16d11ae1476f2b41ab4c2dd975cb7f1776 (diff)
Merge branch '213584-pip-root-certificate' into 'master'v3.7.1
Specify PIP_CERT when installing pip packages See merge request gitlab-org/security-products/license-management!133
Diffstat (limited to 'lib/license/management')
-rw-r--r--lib/license/management/python.rb6
-rw-r--r--lib/license/management/shell.rb2
-rw-r--r--lib/license/management/version.rb2
3 files changed, 8 insertions, 2 deletions
diff --git a/lib/license/management/python.rb b/lib/license/management/python.rb
index c5f7107..b8932f9 100644
--- a/lib/license/management/python.rb
+++ b/lib/license/management/python.rb
@@ -50,6 +50,12 @@ module License
)
end
end
+
+ def default_env
+ return {} unless shell.custom_certificate_installed?
+
+ { 'PIP_CERT' => ENV.fetch('PIP_CERT', shell.custom_certificate_path.to_s) }
+ end
end
end
end
diff --git a/lib/license/management/shell.rb b/lib/license/management/shell.rb
index 691a8ea..8850e60 100644
--- a/lib/license/management/shell.rb
+++ b/lib/license/management/shell.rb
@@ -33,7 +33,7 @@ module License
private
def expand(command)
- Array(command).map(&:to_s).join(' ')
+ Array(command).flatten.map(&:to_s).join(' ')
end
def trust!(certificate)
diff --git a/lib/license/management/version.rb b/lib/license/management/version.rb
index b422fd6..fe617f9 100644
--- a/lib/license/management/version.rb
+++ b/lib/license/management/version.rb
@@ -2,6 +2,6 @@
module License
module Management
- VERSION = '3.7.0'
+ VERSION = '3.7.1'
end
end