From a3b3f144755bcaefd4c96e884ce0c39276c2457c Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Fri, 12 Apr 2024 10:00:00 +0200 Subject: [PATCH] docs: fix frozen install help (#1167) Co-authored-by: Tim de Jager --- docs/reference/cli.md | 13 +++++++------ src/cli/mod.rs | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/reference/cli.md b/docs/reference/cli.md index ed4be8480..53d4c8881 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -89,9 +89,10 @@ Installs all dependencies specified in the lockfile `pixi.lock`. Which gets generated on `pixi add` or when you manually change the [manifest file](configuration.md) file and run `pixi install`. ##### Options + /// Install the environment as defined in the lockfile, doesn't abort when lockfile isn't up-to-date with the manifest file. - `--manifest-path `: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. ```shell @@ -128,7 +129,7 @@ You cannot run `pixi run source setup.bash` as `source` is not available in the ##### Options - `--manifest-path `: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to run the task in, if none are provided the default environment will be used or a selector will be given to select the right environment. @@ -328,7 +329,7 @@ List project's packages. Highlighted packages are explicit dependencies. - `--sort-by `: Sorting strategy [default: name] [possible values: size, name, type] - `--manifest-path `: The path to [manifest file](configuration.md), by default it searches for one in the parent directories. - `--environment (-e)`: The environment's packages to list, if non is provided the default environment's packages will be listed. -- `--frozen`: Install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: Only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--no-install`: Don't install the environment for pypi solving, only update the lock-file if it can solve without installing. (Implied by `--frozen` and `--locked`) @@ -387,7 +388,7 @@ The package tree can also be inverted (`-i`), to see which packages require a sp - `--platform (-p)`: The platform to list packages for. Defaults to the current platform - `--manifest-path `: The path to [manifest file](configuration.md), by default it searches for one in the parent directories. - `--environment (-e)`: The environment's packages to list, if non is provided the default environment's packages will be listed. -- `--frozen`: Install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: Only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--no-install`: Don't install the environment for pypi solving, only update the lock-file if it can solve without installing. (Implied by `--frozen` and `--locked`) @@ -497,7 +498,7 @@ To exit the pixi shell, simply run `exit`. ##### Options - `--manifest-path `: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to activate the shell in, if none are provided the default environment will be used or a selector will be given to select the right environment. @@ -523,7 +524,7 @@ This command prints the activation script of an environment. - `--shell (-s)`: The shell for which the activation script should be printed. Defaults to the current shell. Currently supported variants: [`bash`, `zsh`, `xonsh`, `cmd`, `powershell`, `fish`, `nushell`] - `--manifest-path`: the path to [manifest file](configuration.md), by default it searches for one in the parent directories. -- `--frozen`: install the environment as defined in the lockfile. Without checking the status of the lockfile. It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). +- `--frozen`: install the environment as defined in the lockfile, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`). - `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`. - `--environment (-e)`: The environment to activate, if none are provided the default environment will be used or a selector will be given to select the right environment. diff --git a/src/cli/mod.rs b/src/cli/mod.rs index b6af619ac..13d41a1fb 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -89,10 +89,10 @@ pub enum Command { #[group(multiple = false)] /// Lock file usage from the CLI pub struct LockFileUsageArgs { - /// Don't check or update the lockfile, continue with previously installed environment. + // Install the environment as defined in the lockfile, doesn't update lockfile if it isn't up-to-date with the manifest file. #[clap(long, conflicts_with = "locked", env = "PIXI_FROZEN")] pub frozen: bool, - /// Check if lockfile is up to date, aborts when lockfile isn't up to date with the manifest file. + /// Check if lockfile is up-to-date before installing the environment, aborts when lockfile isn't up-to-date with the manifest file. #[clap(long, conflicts_with = "frozen", env = "PIXI_LOCKED")] pub locked: bool, } @@ -113,7 +113,7 @@ pub async fn execute() -> miette::Result<()> { let args = Args::parse(); let use_colors = use_color_output(&args); - // Setup the default miette handler based on whether or not we want colors or not. + // Set up the default miette handler based on whether we want colors or not. miette::set_hook(Box::new(move |_| { Box::new( miette::MietteHandlerOpts::default() @@ -196,7 +196,7 @@ pub async fn execute() -> miette::Result<()> { .into_diagnostic()?, ); - // Setup the tracing subscriber + // Set up the tracing subscriber let fmt_layer = tracing_subscriber::fmt::layer() .with_ansi(use_colors) .with_writer(IndicatifWriter::new(progress::global_multi_progress()))