Skip to content

Indented bashExtraText breaks xonsh, doesn't match parent indentation #422

@dholth

Description

@dholth

setup-miniconda adds text to bash-like shell rc's, including .xonshrc

For .xonshrc as created by conda's initialize.py, https://github.com/conda/conda/blob/main/conda/core/initialize.py#L1564-L1576 is indented four spaces.

But a block inserted by setup-miniconda has two spaces indentation.

// Bash profiles
let bashExtraText: string = `
# ----------------------------------------------------------------------------
# Conda Setup Action: Basic configuration
set -eo pipefail`;
if (isValidActivate) {
bashExtraText += `
# Conda Setup Action: Custom activation
conda activate "${inputs.activateEnvironment}"`;
bashExtraText += `
# ----------------------------------------------------------------------------`;

Unknown why this started causing failures now in the conda-libmamba-solver CI, but it did.

Probably bashExtraText has indentation "by accident" to fit into the typescript code, and should have no indentation. This would satisfy Python-based xonsh by taking bashExtraText outside of the conda initialize.py if !(test -f "{conda_exe}"): block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions