forked from prefix-dev/pixi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
pixi global upgrade-all
error message
Fixes prefix-dev#2293
- Loading branch information
1 parent
975b123
commit 935ecee
Showing
2 changed files
with
9 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,26 @@ | ||
use clap::Parser; | ||
use pixi_config::ConfigCli; | ||
use rattler_conda_types::Platform; | ||
|
||
use crate::cli::{cli_config::ChannelsConfig, has_specs::HasSpecs}; | ||
use crate::cli::cli_config::ChannelsConfig; | ||
|
||
/// Upgrade specific package which is installed globally. | ||
/// Upgrade all globally installed packages | ||
#[derive(Parser, Debug)] | ||
#[clap(arg_required_else_help = true)] | ||
pub struct Args { | ||
/// Specifies the packages to upgrade. | ||
//#[arg(required = true)] | ||
pub specs: Vec<String>, | ||
|
||
#[clap(flatten)] | ||
channels: ChannelsConfig, | ||
|
||
#[clap(flatten)] | ||
config: ConfigCli, | ||
|
||
/// The platform to install the package for. | ||
#[clap(long, default_value_t = Platform::current())] | ||
platform: Platform, | ||
} | ||
|
||
impl HasSpecs for Args { | ||
fn packages(&self) -> Vec<&str> { | ||
self.specs.iter().map(AsRef::as_ref).collect() | ||
} | ||
} | ||
|
||
pub async fn execute(_args: Args) -> miette::Result<()> { | ||
Err( | ||
miette::miette!("You can use `pixi global update` for most use cases").wrap_err( | ||
"`pixi global upgrade-all` has been removed, and will be re-added in future releases", | ||
), | ||
miette::miette!("You can call `pixi global update` for most use cases") | ||
.wrap_err("`pixi global upgrade-all` has been removed"), | ||
) | ||
} |