Skip to content

$USER environment variable is not set in terminal sessions #1799

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

Closed
deansheather opened this issue May 26, 2022 · 0 comments · Fixed by #1818
Closed

$USER environment variable is not set in terminal sessions #1799

deansheather opened this issue May 26, 2022 · 0 comments · Fixed by #1818
Assignees
Labels
api Area: HTTP API
Milestone

Comments

@deansheather
Copy link
Member

OS Information

Steps to Reproduce

  1. Create a linux workspace
  2. Open a terminal in the web terminal or the CLI
  3. echo $USER
  4. Notice that nothing is printed

Expected

The current user's username (e.g. coder) should be printed

Actual

Nothing is printed

Workaround

Users can use $(whoami) in scripts instead of $USER

@f0ssel

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

Successfully merging a pull request may close this issue.

3 participants