conda / conda/constructor

condarc key in construct.yaml improperly parses comments with '#'

Open
#1,240 2 comments 0 reactions 0 assignees View on GitHub
type::bug
Dominant language
Python
Stars
497
Forks
181
Avg merge
1d 16h
Merged PRs (30d)
17

Description

### Checklist

- [x] I added a descriptive title
- [x] I searched open reports and couldn't find a duplicate

### What happened?

In Below key the written condarc file will not have comments see below for written file --

```
condarc: |
# This config file should be located in `C:\Python\Miniforge3\.condarc`.
#
# There is another config file in `C:\ProgramData\conda\condarc.d`.
#
allow_other_channels: yes
report_errors: no
auto_update_conda: false
# blocking commercial channels
denylist_channels:
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
- https://repo.anaconda.com/pkgs/msys2
```

what is written (missing comments)

```
allow_other_channels: yes
report_errors: no
auto_update_conda: false
denylist_channels:
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
- https://repo.anaconda.com/pkgs/msys2
```

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.