command line should suggest how to default back to system version
- Dominant language
- Go
- Stars
- 25.6k
- Forks
- 941
- Avg merge
- 9h 24m
- Merged PRs (30d)
- 3
Description
### Problem scenario
I'm not invested in asdf, but it was a requirement of another project I cloned. Don't get me wrong, I think it's a great project, however I'm experiencing the following issue.
The recommended install process must have altered my bash scripts (without me thinking too much of it):
```
$ grep -d skip asdf ~/.*
~/.bashrc:. $HOME/.asdf/asdf.sh
~/.bashrc:. $HOME/.asdf/completions/asdf.bash
```
Now in an unrelated project, `asdf` has "taken over" and "hijacked" my normal build process.
```
~/other-project$ yarn install
No version is set for command node
Consider adding one of the following versions in your config file at
nodejs 16.14.0
nodejs 16.13.1
```
This of course worked before I installed asdf — other-project does not require or is not aware of asdf
The above error message also does not mention asdf! It took me a while to link the error back to the recent install of the asdf-requiring codebase.
### Describe the proposed solution
From reading asdf documentation, I see that the following might work:
```
asdf global nodejs system
```
Could that be given as an extra recommendation for the above error message:
```
~/other-project$ yarn install
No version is set for command node
Consider adding one of the following versions in your config file at
nodejs 16.14.0
nodejs 16.13.1
If this project does not have a .tool-versions file or does not use asdf, you can revert to the system version of nodejs with
asdf local nodejs system (for just this folder)
or
asdf global nodejs system
```
(someone may need to enlighten me as to whether `asdf global nodejs system` takes precedence over versions set in .tool-versions)
### Describe similar `asdf` features and why they are not sufficient
?
### Describe other workarounds you've considered
Other workarounds: disabling asdf by uninstalling the first project and recommending they don't mess with my system
Contributor guide
Research direction
Start by locating the command-line path that emits “No version is set for command” and compare its behavior with the documented .tool-versions, local, and global settings. Verify how a system fallback should interact with a project configuration, then confirm the completed change gives users a clear local or global command without disrupting existing version suggestions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, shell
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100