Enable --no-symlinks by default and fix sccache installation (#936)

Partially resolve #731

Using symlinks not only add unnecessary bloat to users' `$CARGO_HOME/bin` directory, but it actually breaks `sccache`, which inspects its binary name and decides how to act on.

For `sccache` to function, it must be invoked directly or use a hard link.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-03-22 21:58:37 +11:00 committed by GitHub
parent 8b83e150bb
commit b69d8c25cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,14 +154,10 @@ pub struct Args {
#[clap(help_heading = "Overrides", long)]
pub no_discover_github_token: bool,
/// Disable symlinking / versioned updates.
/// This flag is now enabled by default thus a no-op.
///
/// By default, Binstall will install a binary named `<name>-<version>` in the install path, and
/// either symlink or copy it to (depending on platform) the plain binary name. This makes it
/// possible to have multiple versions of the same binary, for example for testing or rollback.
///
/// Pass this flag to disable this behavior.
#[clap(help_heading = "Options", long)]
/// By default, Binstall will install a binary as-is in the install path.
#[clap(help_heading = "Options", long, default_value_t = true)]
pub no_symlinks: bool,
/// Dry run, fetch and show changes without installing binaries.