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

$HOME environment variable being set to the workspace deploy directory #1475

Closed
richardm90 opened this issue Aug 5, 2023 · 2 comments · Fixed by #1621
Closed

$HOME environment variable being set to the workspace deploy directory #1475

richardm90 opened this issue Aug 5, 2023 · 2 comments · Fixed by #1621
Labels
enhancement New feature or request good first issue Good for newcomers. Feel free to ask for help with these!

Comments

@richardm90
Copy link
Contributor

This may have always been the case and I've only just noticed whilst recently trying out the local development functionality but when I deploy my local workspace and build my application (using gmake) I've noticed that my home directory is being set to the workspace deploy directory.

This means I can't reference my true home directory (using the $HOME environment variable) in a Makefile or a bash script that I want to execute through VS Code.

This doesn't seem right to me.


Context Version
Code for IBM i version 2.0.2
Visual Studio Code version 1.81.0
Operating System linux_x64
Active extensions
COBOL (cobol): 9.7.23
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.3.1
Db2 for IBM i (vscode-db2i): 0.3.3
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.12.0
Extension Authoring (extension-editing): 1.0.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
GitLens — Git supercharged (gitlens): 14.2.0
IBM i Notebooks (vscode-ibmi-notebooks): 0.0.6
JSON Language Features (json-language-features): 1.0.0
Makefile Tools (makefile-tools): 0.7.0
Merge Conflict (merge-conflict): 1.0.0
Microsoft Account (microsoft-authentication): 0.0.1
NPM support for VS Code (npm): 1.0.1
Node Debug Auto-attach (debug-auto-launch): 1.0.0
TODO Highlight (vscode-todo-highlight): 1.0.5

Not connected 🔌

@worksofliam
Copy link
Contributor

Yep, we do the set working directory as the deploy directory - this is because most build tools expect that.

It looks like getDefaultVariables is setting &HOME to the working directory (which we refer to internally as homeDirectory even though it is not), which is then being set to &HOME here.

Easy fix is to take it out of getDefaultVariables.

@worksofliam worksofliam added the enhancement New feature or request label Aug 5, 2023
@richardm90
Copy link
Contributor Author

Hi @worksofliam , let me give that a try.

@worksofliam worksofliam added the good first issue Good for newcomers. Feel free to ask for help with these! label Aug 14, 2023
@richardm90 richardm90 mentioned this issue Oct 31, 2023
6 tasks
@worksofliam worksofliam linked a pull request Nov 19, 2023 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers. Feel free to ask for help with these!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants