Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use "channels" and not extraChannels #82

Merged
merged 4 commits into from
Jul 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use "channels" and not extraChannels
  • Loading branch information
wolfv committed Jul 12, 2022
commit dad09f4177d0f60bbc996dc93e9352f199f6cdac
17 changes: 9 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,14 @@ function makeCondarcOpts (inputs, extraChannels) {
if (inputs.channelAlias) {
condarcOpts.channel_alias = inputs.channelAlias
}
const channels =
inputs.channels && extraChannels
? inputs.channels + ',' + extraChannels.join(', ')
: inputs.channels || extraChannels?.join(', ')
if (channels) {
condarcOpts.channels = channels.split(',').map(s => s.trim())
}
let channels = []
if (inputs.channels)
channels = inputs.channels.split(',').map(s => s.trim());
if (extraChannels)
channels.push.apply(channels, extraChannels);
if (channels)
condarcOpts.channels = channels

const moreOpts = yaml.safeLoad(inputs.condaRcOptions)
if (moreOpts) {
condarcOpts = { ...condarcOpts, ...moreOpts }
Expand Down Expand Up @@ -446,7 +447,7 @@ async function main () {
}

// Setup .condarc
const condarcOpts = makeCondarcOpts(inputs, envYaml?.extraChannels)
const condarcOpts = makeCondarcOpts(inputs, envYaml?.channels)
if (inputs.condaRcFile) {
fs.copyFileSync(inputs.condaRcFile, PATHS.condarc)
}
Expand Down