-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add /QOpenSys/pkgs/bin to .bashrc if needed #1695
Conversation
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand Questions:
|
Good questions! The code runs whatever shell is used and do not run only if bash is the current shell. On the other hand, we expect the shell to be bash and offer to change it if it's not; that's why I didn't think about conditioning this action to bash only. What do you think? |
Do we expect it? It's not a requirement (to my knowledge), although it could be argued that it should be... however, the users may use the extension against older or customer systems, where My thoughts are that we should keep the Additional comment about PATH: /QOpenSys/pkgs/bin should be before /usr/bin and /QOpenSys/usr/bin - but you don't check for that. Would it be easy to have this check too? |
Fair enough! We'll only do this if the current shell is bash then.
I don't check it but since I always add /QOpenSys/pkgs/bin in first place in the path, that should not be necessary 😄 |
But your check will accept a PATH having /QOpenSys/pkgs/bin after the other ones - which is not correct (maybe a user mistake). 😉 (Sorry for being such a P... in the A..! 😆 ) |
No, no, you're absolutely right 😅 |
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@chrjorgensen I followed your advice and:
Hopefully this will receive the "Jørgensen Seal of Approval" 😁 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments. I think the console.log
should be removed.
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Namely if it appears after /usr/bin or /QOpenSys/usr/bin Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes
Resolves #1691
This PR enhances the connection process and make it look for
/QOpenSys/pkgs/bin
in thePATH
environment variable.If it's not there, it will offer to either create
~/.bashrc
file or modify it to append/QOpenSys/pkgs/bin
to thePATH
environment variable.The creation/modification is delayed in the connection process, so it's only done once the connection is ready to do it.
The connection process will only check this once or if the user connects and reload the server settings, so we won't bother someone who would not like to modify its
PATH
.Since .bashrc is only relevant for non-login shell, this shouldn't interfere with
.profile
or.bash_profile
.Checklist