Skip to content

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

Description

@Kansses

Checklist

  • I added a descriptive title
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type::bugdescribes erroneous operation, use severity::* to classify the type

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions