Ensure symlink warning is shown (#15126)

Fixes #15115, see also https://github.com/clap-rs/clap/discussions/6092

<img width="1079" height="1030" alt="image"
src="https://github.com/user-attachments/assets/05b003a6-9ca0-4f2b-8a74-078aa155ce6d"
/>
This commit is contained in:
konsti 2025-08-07 15:56:59 +02:00 committed by GitHub
parent 9c634d9b13
commit 84d57f2ee9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 67 additions and 11 deletions

View file

@ -2769,6 +2769,11 @@ pub struct VenvArgs {
///
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
/// Windows.
///
/// WARNING: The use of symlink link mode is discouraged, as they create tight coupling between
/// the cache and the target environment. For example, clearing the cache (`uv cache clear`)
/// will break all installed packages by way of removing the underlying source files. Use
/// symlinks with caution.
#[arg(long, value_enum, env = EnvVars::UV_LINK_MODE)]
pub link_mode: Option<uv_install_wheel::LinkMode>,
@ -4808,6 +4813,11 @@ pub struct ToolUpgradeArgs {
///
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
/// Windows.
///
/// WARNING: The use of symlink link mode is discouraged, as they create tight coupling between
/// the cache and the target environment. For example, clearing the cache (`uv cache clear`)
/// will break all installed packages by way of removing the underlying source files. Use
/// symlinks with caution.
#[arg(
long,
value_enum,
@ -5612,6 +5622,11 @@ pub struct InstallerArgs {
///
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
/// Windows.
///
/// WARNING: The use of symlink link mode is discouraged, as they create tight coupling between
/// the cache and the target environment. For example, clearing the cache (`uv cache clear`)
/// will break all installed packages by way of removing the underlying source files. Use
/// symlinks with caution.
#[arg(
long,
value_enum,
@ -5824,6 +5839,11 @@ pub struct ResolverArgs {
///
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
/// Windows.
///
/// WARNING: The use of symlink link mode is discouraged, as they create tight coupling between
/// the cache and the target environment. For example, clearing the cache (`uv cache clear`)
/// will break all installed packages by way of removing the underlying source files. Use
/// symlinks with caution.
#[arg(
long,
value_enum,
@ -6028,6 +6048,11 @@ pub struct ResolverInstallerArgs {
///
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
/// Windows.
///
/// WARNING: The use of symlink link mode is discouraged, as they create tight coupling between
/// the cache and the target environment. For example, clearing the cache (`uv cache clear`)
/// will break all installed packages by way of removing the underlying source files. Use
/// symlinks with caution.
#[arg(
long,
value_enum,