Skip to content

In a directory with an override, display override after succesful default change #1648

@carols10cents

Description

@carols10cents

The problem I am trying to solve

I have some directories where I've set overrides and some directories where I haven't set overrides, and I don't remember which directories have overrides or not.

I'll be working on a project and want to change the Rust version I'm currently using, so I'll run:

$ rustup default beta

Which outputs:

info: using existing install for 'beta-x86_64-apple-darwin'
info: default toolchain set to 'beta-x86_64-apple-darwin'

  beta-x86_64-apple-darwin unchanged - rustc 1.33.0-beta.4 (635817b9d 2019-01-24)

So I say, "cool, I'm using beta now!" and go about cargo building, etc.

In a directory without an override, I am indeed using beta.

In a directory with an override, I get the same output, but I am not using beta (necessarily), I'm using the override. So I cargo build thinking I'm on beta, but I'm not.

The solution I'd like

If I'm in a directory without an override, I'd like the current behavior of rustup default to stay the same.

If I'm in a directory with an override, I'd like the output of rustup default to remind me that I have an override and that I'm not using the default that I just changed. Something like:

$ rustup default beta
info: using existing install for 'beta-x86_64-apple-darwin'
info: default toolchain set to 'beta-x86_64-apple-darwin'

  beta-x86_64-apple-darwin unchanged - rustc 1.33.0-beta.4 (635817b9d 2019-01-24)

(currently using 1.24.1-x86_64-apple-darwin, directory override for '/Users/carolnichols/rust/carol-test')

If this is a personal problem of mine, I can script my way around it, but I wanted to file this and see what others thought and then potentially submit a PR if other folks have this problem too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions