diff --git a/dist/setup/index.js b/dist/setup/index.js index 6cdc4362..446caaed 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -50585,6 +50585,19 @@ function condaInit(inputs, options) { bashLines.push("# Conda Setup Action: Custom activation", `conda activate "${inputs.activateEnvironment}"`, "# ----------------------------------------------------------------------------"); } const bashExtraText = bashLines.join("\n"); + // Xonsh profiles + // NOTE: Using array.join() to prevent auto-formatters from adding indentation + const xonshLines = [ + "", + "# ----------------------------------------------------------------------------", + "# Conda Setup Action: Basic configuration", + "$RAISE_SUBPROC_ERROR = True", // equivalent to: set -e + "$XONSH_PIPEFAIL = True", // equivalent to: set -o pipefail + ]; + if (isValidActivate) { + xonshLines.push("# Conda Setup Action: Custom activation", `conda activate "${inputs.activateEnvironment}"`, "# ----------------------------------------------------------------------------"); + } + const xonshExtraText = xonshLines.join("\n"); // Batch profiles // NOTE: Using array.join() to prevent auto-formatters from adding indentation const batchLines = [ @@ -50605,7 +50618,7 @@ function condaInit(inputs, options) { "~/.zshrc": bashExtraText, "~/.config/fish/config.fish": bashExtraText, "~/.tcshrc": bashExtraText, - "~/.xonshrc": bashExtraText, + "~/.xonshrc": xonshExtraText, "~/.config/powershell/profile.ps1": powerExtraText, "~/Documents/PowerShell/profile.ps1": powerExtraText, "~/Documents/WindowsPowerShell/profile.ps1": powerExtraText, diff --git a/package-lock.json b/package-lock.json index 3aa3c498..275f664b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -327,6 +327,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.12.0.tgz", "integrity": "sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "6.12.0", "@typescript-eslint/types": "6.12.0", @@ -496,6 +497,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -937,6 +939,7 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "dev": true, + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -2374,6 +2377,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "dev": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/src/conda.ts b/src/conda.ts index b0da0336..3d2ffc57 100644 --- a/src/conda.ts +++ b/src/conda.ts @@ -452,6 +452,24 @@ export async function condaInit( } const bashExtraText = bashLines.join("\n"); + // Xonsh profiles + // NOTE: Using array.join() to prevent auto-formatters from adding indentation + const xonshLines: string[] = [ + "", + "# ----------------------------------------------------------------------------", + "# Conda Setup Action: Basic configuration", + "$RAISE_SUBPROC_ERROR = True", // equivalent to: set -e + "$XONSH_PIPEFAIL = True", // equivalent to: set -o pipefail + ]; + if (isValidActivate) { + xonshLines.push( + "# Conda Setup Action: Custom activation", + `conda activate "${inputs.activateEnvironment}"`, + "# ----------------------------------------------------------------------------", + ); + } + const xonshExtraText = xonshLines.join("\n"); + // Batch profiles // NOTE: Using array.join() to prevent auto-formatters from adding indentation const batchLines: string[] = [ @@ -484,7 +502,7 @@ export async function condaInit( "~/.zshrc": bashExtraText, "~/.config/fish/config.fish": bashExtraText, "~/.tcshrc": bashExtraText, - "~/.xonshrc": bashExtraText, + "~/.xonshrc": xonshExtraText, "~/.config/powershell/profile.ps1": powerExtraText, "~/Documents/PowerShell/profile.ps1": powerExtraText, "~/Documents/WindowsPowerShell/profile.ps1": powerExtraText,