Commits

Michał Górny committed aed250a

Preserve proxy variables in VCS call environment.

  • Participants
  • Parent commits c784a4e

Comments (0)

Files changed (1)

File smartliverebuild/vcs/__init__.py

 	@property
 	def callenv(self):
 		""" A dict of environment keys to set up when executing update
-			command. By default, empty (meaning to wipe the env).
+			command. By default, preserves proxy settings.
 		"""
-		return {}
+		preserve_vars = (
+			# curl proxy vars
+			'http_proxy',
+			'https_proxy', 'HTTPS_PROXY',
+			'all_proxy', 'ALL_PROXY',
+			'no_proxy', 'NO_PROXY'
+		)
+
+		env = {}
+		for v in preserve_vars:
+			if v in os.environ:
+				env[v] = os.environ[v]
+		return env
 
 	@property
 	def cpv(self):