diff --git a/src/molecule/dependency/base.py b/src/molecule/dependency/base.py index 911176fad..a442e6d79 100644 --- a/src/molecule/dependency/base.py +++ b/src/molecule/dependency/base.py @@ -54,7 +54,12 @@ def execute_with_retries(self): exception = None try: - util.run_command(self._sh_command, debug=self._config.debug, check=True) + util.run_command( + self._sh_command, + debug=self._config.debug, + check=True, + env=self.env, + ) msg = "Dependency completed successfully." LOG.info(msg) return @@ -71,7 +76,12 @@ def execute_with_retries(self): self.SLEEP += self.BACKOFF try: - util.run_command(self._sh_command, debug=self._config.debug, check=True) + util.run_command( + self._sh_command, + debug=self._config.debug, + check=True, + env=self.env, + ) msg = "Dependency completed successfully." LOG.info(msg) return