You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let actualchannel = if potential_matches.len() == 1{
176
+
potential_matches
177
+
.first()
178
+
.expect("length should be 1")
179
+
.as_str()
180
+
}else{
181
+
channel
182
+
};
183
+
169
184
let channel_info = config_data
170
185
.installed_channels
171
-
.get(channel)
186
+
.get(actualchannel)
172
187
.ok_or_else(|| match juliaup_channel_source {
173
188
JuliaupChannelSource::CmdLine => {
174
-
if versions_db.available_channels.contains_key(channel){
175
-
UserError{msg:format!("`{}` is not installed. Please run `juliaup add {}` to install channel or version.",channel, channel)}
189
+
if versions_db.available_channels.contains_key(actualchannel){
190
+
UserError{msg:format!("`{}` is not installed. Please run `juliaup add {}` to install channel or version.",actualchannel, actualchannel)}
176
191
}else{
177
-
UserError{msg:format!("ERROR: Invalid Juliaup channel `{}`. Please run `juliaup list` to get a list of valid channels and versions.",channel)}
192
+
UserError{msg:format!("ERROR: Invalid Juliaup channel `{}`. Please run `juliaup list` to get a list of valid channels and versions.",actualchannel)}
178
193
}
179
194
}.into(),
180
195
JuliaupChannelSource::EnvVar=> {
181
-
if versions_db.available_channels.contains_key(channel){
182
-
UserError{msg:format!("`{}` for environment variable JULIAUP_CHANNEL is not installed. Please run `juliaup add {}` to install channel or version.",channel, channel)}
196
+
if versions_db.available_channels.contains_key(actualchannel){
197
+
UserError{msg:format!("`{}` for environment variable JULIAUP_CHANNEL is not installed. Please run `juliaup add {}` to install channel or version.",actualchannel, actualchannel)}
183
198
}else{
184
-
UserError{msg:format!("ERROR: Invalid Juliaup channel `{}` in environment variable JULIAUP_CHANNEL. Please run `juliaup list` to get a list of valid channels and versions.",channel)}
199
+
UserError{msg:format!("ERROR: Invalid Juliaup channel `{}` in environment variable JULIAUP_CHANNEL. Please run `juliaup list` to get a list of valid channels and versions.",actualchannel)}
185
200
}
186
201
}.into(),
187
202
JuliaupChannelSource::Override=> {
188
-
if versions_db.available_channels.contains_key(channel){
189
-
UserError{msg:format!("`{}` for directory override is not installed. Please run `juliaup add {}` to install channel or version.",channel, channel)}
203
+
if versions_db.available_channels.contains_key(actualchannel){
204
+
UserError{msg:format!("`{}` for directory override is not installed. Please run `juliaup add {}` to install channel or version.",actualchannel, actualchannel)}
190
205
}else{
191
-
UserError{msg:format!("ERROR: Invalid Juliaup channel `{}` in directory override. Please run `juliaup list` to get a list of valid channels and versions.",channel)}
206
+
UserError{msg:format!("ERROR: Invalid Juliaup channel `{}` in directory override. Please run `juliaup list` to get a list of valid channels and versions.",actualchannel)}
192
207
}
193
208
}.into(),
194
-
JuliaupChannelSource::Default => anyhow!("The Juliaup configuration is in an inconsistent state, the currently configured default channel `{}` is not installed.",channel)
209
+
JuliaupChannelSource::Default => anyhow!("The Juliaup configuration is in an inconsistent state, the currently configured default channel `{}` is not installed.",actualchannel)
JuliaupConfigChannel::SystemChannel{ version } => {
205
220
let path = &config_data
206
221
.installed_versions.get(version)
207
-
.ok_or_else(|| anyhow!("The juliaup configuration is in an inconsistent state, the channel {} is pointing to Julia version {}, which is not installed.",channel, version))?.path;
222
+
.ok_or_else(|| anyhow!("The juliaup configuration is in an inconsistent state, the channel {} is pointing to Julia version {}, which is not installed.",actualchannel, version))?.path;
0 commit comments