Unhide the --directory option (#7653)

This commit is contained in:
Zanie Blue 2024-09-24 11:45:33 -05:00 committed by GitHub
parent 5da73a24cb
commit 0c6117f5da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 337 additions and 2 deletions

View file

@ -234,7 +234,11 @@ pub struct GlobalArgs {
pub no_progress: bool,
/// Change to the given directory prior to running the command.
#[arg(global = true, long, hide = true)]
///
/// Relative paths are resolved with the given directory as the base.
///
/// See `--project` to only change the project root directory.
#[arg(global = true, long)]
pub directory: Option<PathBuf>,
/// Run the command within the given project directory.
@ -246,6 +250,8 @@ pub struct GlobalArgs {
/// Other command-line arguments (such as relative paths) will be resolved relative
/// to the current working directory.
///
/// See `--directory` to change the working directory entirely.
///
/// This setting has no effect when used in the `uv pip` interface.
#[arg(global = true, long)]
pub project: Option<PathBuf>,