Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
goanpeca committed Mar 19, 2020
1 parent 5f69016 commit 8b5066c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 40 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/example-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ jobs:
run: |
conda info
conda list
conda config --describe channel_priority
conda config --show-sources
conda config --show
36 changes: 18 additions & 18 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32863,6 +32863,18 @@ function setupMiniconda(minicondaVersion, architecture, condaVersion, condaBuild
result = yield setVariables(useBundled);
if (!result["ok"])
return result;
if (condaVersion) {
consoleLog("Installing Conda...");
result = yield condaCommand(`install --name base conda=${condaVersion} --quiet`, useBundled);
if (!result["ok"])
return result;
}
if (condaConfig["auto_update_conda"] == "true") {
consoleLog("Updating conda...");
result = yield condaCommand("update conda --quiet", useBundled);
if (!result["ok"])
return result;
}
consoleLog("Initialize Conda...");
result = yield condaInit(activateEnvironment, useBundled, condaConfig, removeProfiles);
if (!result["ok"])
Expand All @@ -32879,23 +32891,17 @@ function setupMiniconda(minicondaVersion, architecture, condaVersion, condaBuild
return { ok: false, error: err };
}
}
if (condaConfig) {
consoleLog("Applying conda configuration...");
result = yield applyCondaConfiguration(condaConfig, useBundled);
if (!result["ok"])
return result;
}
consoleLog("Setup Conda basic configuration...");
result = yield condaCommand("config --set always_yes yes --set changeps1 no", useBundled);
if (!result["ok"])
return result;
// Any conda commands run here after init and setup
if (condaVersion) {
consoleLog("Installing Conda...");
result = yield condaCommand(`install --name base conda=${condaVersion} --quiet`, useBundled);
if (!result["ok"])
return result;
}
if (condaConfig["auto_update_conda"] == "true") {
consoleLog("Updating conda...");
result = yield condaCommand("update conda --quiet", useBundled);
if (!result["ok"])
return result;
}
if (condaBuildVersion) {
consoleLog("Installing Conda Build...");
result = yield condaCommand(`install --name base conda-build=${condaBuildVersion} --quiet`, useBundled);
Expand Down Expand Up @@ -32942,12 +32948,6 @@ function setupMiniconda(minicondaVersion, architecture, condaVersion, condaBuild
if (!result["ok"])
return result;
}
if (condaConfig) {
consoleLog("Applying conda configuration...");
result = yield applyCondaConfiguration(condaConfig, useBundled);
if (!result["ok"])
return result;
}
}
catch (err) {
return { ok: false, error: err };
Expand Down
42 changes: 21 additions & 21 deletions src/setup-conda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,21 @@ async function setupMiniconda(
result = await setVariables(useBundled);
if (!result["ok"]) return result;

if (condaVersion) {
consoleLog("Installing Conda...");
result = await condaCommand(
`install --name base conda=${condaVersion} --quiet`,
useBundled
);
if (!result["ok"]) return result;
}

if (condaConfig["auto_update_conda"] == "true") {
consoleLog("Updating conda...");
result = await condaCommand("update conda --quiet", useBundled);
if (!result["ok"]) return result;
}

consoleLog("Initialize Conda...");
result = await condaInit(
activateEnvironment,
Expand All @@ -630,6 +645,12 @@ async function setupMiniconda(
}
}

if (condaConfig) {
consoleLog("Applying conda configuration...");
result = await applyCondaConfiguration(condaConfig, useBundled);
if (!result["ok"]) return result;
}

consoleLog("Setup Conda basic configuration...");
result = await condaCommand(
"config --set always_yes yes --set changeps1 no",
Expand All @@ -638,21 +659,6 @@ async function setupMiniconda(
if (!result["ok"]) return result;

// Any conda commands run here after init and setup
if (condaVersion) {
consoleLog("Installing Conda...");
result = await condaCommand(
`install --name base conda=${condaVersion} --quiet`,
useBundled
);
if (!result["ok"]) return result;
}

if (condaConfig["auto_update_conda"] == "true") {
consoleLog("Updating conda...");
result = await condaCommand("update conda --quiet", useBundled);
if (!result["ok"]) return result;
}

if (condaBuildVersion) {
consoleLog("Installing Conda Build...");
result = await condaCommand(
Expand Down Expand Up @@ -718,12 +724,6 @@ async function setupMiniconda(
);
if (!result["ok"]) return result;
}

if (condaConfig) {
consoleLog("Applying conda configuration...");
result = await applyCondaConfiguration(condaConfig, useBundled);
if (!result["ok"]) return result;
}
} catch (err) {
return { ok: false, error: err };
}
Expand Down

0 comments on commit 8b5066c

Please sign in to comment.