Skip to content

Commit

Permalink
MAINT: Do not always add dependencies section to update conda
Browse files Browse the repository at this point in the history
environment file
  • Loading branch information
hmaarrfk committed Jan 7, 2024
1 parent 8318291 commit c8b2e77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions asv/plugins/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ def _setup(self):
try:
env_file.write(f'name: {self.name}\nchannels:\n')
env_file.writelines((f' - {ch}\n' for ch in self._conda_channels))
env_file.write('dependencies:\n')

# categorize & write dependencies based on pip vs. conda
env_file.writelines((f' - {s}\n' for s in conda_args))
if conda_args:
env_file.write('dependencies:\n')
# categorize & write dependencies based on pip vs. conda
env_file.writelines((f' - {s}\n' for s in conda_args))
env_file.close()
try:
env_file_name = self._conda_environment_file or env_file.name
Expand Down

0 comments on commit c8b2e77

Please sign in to comment.