Skip to content

Commit

Permalink
Applying build
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Feb 24, 2021
1 parent 1d885be commit 780c069
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function run () {
const envFileName = core.getInput('environment-file')
const envFilePath = path.join(process.env.GITHUB_WORKSPACE || '', envFileName)
const envYaml = yaml.safeLoad(fs.readFileSync(envFilePath, 'utf8'))
const envName = envYaml.name
const envName = core.getInput('environment-name') || envYaml.name
const condarc = path.join(os.homedir(), '.condarc')
const profile = path.join(os.homedir(), '.bash_profile')
const bashrc = path.join(os.homedir(), '.bashrc')
Expand Down Expand Up @@ -110,7 +110,7 @@ async function run () {

// final bits of the install
await execute('mkdir -p ' + path.join(os.homedir(), 'micromamba/pkgs/'))
await execute('source ' + profile + ' && micromamba create --strict-channel-priority -y -f ' + envFilePath)
await execute('source ' + profile + ' && micromamba create -n ' + envName + ' --strict-channel-priority -y -f ' + envFilePath)
fs.appendFileSync(profile, 'set -eo pipefail\n')
fs.appendFileSync(profile, 'micromamba activate ' + envName + '\n')
core.endGroup()
Expand Down Expand Up @@ -141,7 +141,7 @@ else
// Can only init once right now ...
// await execPwsh(".\\micromamba.exe shell init -s bash -p $HOME\\micromamba")
await execPwsh('MD $HOME\\micromamba\\pkgs -ea 0')
await execPwsh(`.\\micromamba.exe create --strict-channel-priority -y -f ${envFilePath}`)
await execPwsh(`.\\micromamba.exe create -n ` + envName + ` --strict-channel-priority -y -f ${envFilePath}`)
await execPwsh(autoactivate)

fs.appendFileSync(profile, `micromamba activate ${envName}\n`)
Expand Down

0 comments on commit 780c069

Please sign in to comment.