Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notify user about which denv is being used #150

Open
tomeichlersmith opened this issue Jan 6, 2025 · 1 comment
Open

notify user about which denv is being used #150

tomeichlersmith opened this issue Jan 6, 2025 · 1 comment

Comments

@tomeichlersmith
Copy link
Owner

Is your feature request related to a problem? Please describe.
Often, especially when juggling multiple denvs on a system, reminding the user which is being used can help avoid confusion.

Describe the solution you'd like
I'm thinking this can just be done by adding a _denv_info after the config is loaded. This will keep it quiet but allow for users to easily enable.

Describe alternatives you've considered
You can deduce the denv config that was run by running denv config print in the same directory where the issue is being observed; however, that separation could lead to confusion if any cd is done accidentally.

Additional context
LDMX-Software/ldmx-sw#1505

@tomeichlersmith
Copy link
Owner Author

diff --git a/denv b/denv
index 945533f..cb8694a 100755
--- a/denv
+++ b/denv
@@ -490,6 +490,7 @@ _denv_load_config() {
       return 1
     fi
   fi
+  _denv_info "using denv at ${denv_workspace}"
   # I am choosing to allow sourcing unknown code
   # shellcheck disable=SC1091
   . "${denv_workspace}/.denv/config"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant