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

check if bashrc exists before running it #170870

Merged
merged 3 commits into from Jan 9, 2023
Merged

check if bashrc exists before running it #170870

merged 3 commits into from Jan 9, 2023

Conversation

meganrogge
Copy link
Contributor

@meganrogge meganrogge commented Jan 9, 2023

fix #170868

to test:

  • remove -l args from your bash profile
  • delete your .bashrc file
  • make sure you don't see a file not found error

@meganrogge meganrogge self-assigned this Jan 9, 2023
@meganrogge meganrogge requested a review from Tyriar January 9, 2023 15:09
@meganrogge meganrogge added this to the January 2023 milestone Jan 9, 2023
@meganrogge meganrogge requested a review from Tyriar January 9, 2023 15:26
…on-bash.sh

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
@meganrogge meganrogge enabled auto-merge (squash) January 9, 2023 15:44
@meganrogge meganrogge merged commit 408fc00 into main Jan 9, 2023
@meganrogge meganrogge deleted the merogge/bash-sh branch January 9, 2023 17:18
@@ -13,7 +13,9 @@ VSCODE_SHELL_INTEGRATION=1
# Run relevant rc/profile only if shell integration has been injected, not when run manually
if [ "$VSCODE_INJECTION" == "1" ]; then
if [ -z "$VSCODE_SHELL_LOGIN" ]; then
. ~/.bashrc
if [ -f ~/.bashrc ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to use [ -r ~/.bashrc ]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks #171495

@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt the bash of busybox.
3 participants