diff --git a/src/cirrus/plugins/builders/conda_env.py b/src/cirrus/plugins/builders/conda_env.py index b4f303e..3dafbd6 100644 --- a/src/cirrus/plugins/builders/conda_env.py +++ b/src/cirrus/plugins/builders/conda_env.py @@ -29,10 +29,9 @@ def create(self, **kwargs): conda = kwargs.get('conda', self.conda_bin) upgrade = kwargs.get('upgrade', False) nosetupdevelop = kwargs.get('nosetupdevelop', False) - environment = kwargs.get( - 'environment', - self.build_config.get('conda-environment', None) - ) + environment = kwargs.get('environment', None) + if environment is None: + environment = self.build_config.get('conda-environment', None) if environment is None: msg = "No conda environment yaml specified in cirrus.conf [build] section or via --environment option" LOGGER.error(msg)