GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: use zshenv over zshrc in setup by gautamprikshit1 · Pull Request #1657 · volta-cli/volta

Conversation

@gautamprikshit1

@gautamprikshit1 gautamprikshit1 commented Jan 20, 2024

Copy link
Copy Markdown
Contributor

Closes #1537

@chriskrycho

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
chriskrycho
chriskrycho approved these changes Jan 20, 2024
View reviewed changes

@chriskrycho chriskrycho left a comment

Copy link
Copy Markdown
Contributor

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.

🎉 Thank you!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gautamprikshit1 reacted with rocket emoji
All reactions
  • 🚀 1 reaction
chriskrycho
chriskrycho requested changes Jan 20, 2024
View reviewed changes

@chriskrycho chriskrycho left a comment

Copy link
Copy Markdown
Contributor

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.

So what we have here is good, and we will also need to update the install.sh.in script, which only checks for .zshrc to identify the current shell:

volta/dev/unix/install.sh.in

Lines 118 to 156 in aace0e5

case "$(basename "/$SHELL")" in
bash)
# Shells on macOS default to opening with a login shell, while Linuxes
# default to a *non*-login shell, so if this is macOS we look for
# `.bash_profile` first; if it's Linux, we look for `.bashrc` first. The
# `*` fallthrough covers more than just Linux: it's everything that is not
# macOS (Darwin). It can be made narrower later if need be.
case $(uname) in
Darwin)
echo_fexists "$HOME/.bash_profile" || echo_fexists "$HOME/.bashrc"
;;
*)
echo_fexists "$HOME/.bashrc" || echo_fexists "$HOME/.bash_profile"
;;
esac
;;
zsh)
echo "$HOME/.zshrc"
;;
fish)
echo "$HOME/.config/fish/config.fish"
;;
*)
# Fall back to checking for profile file existence. Once again, the order
# differs between macOS and everything else.
local profiles
case $(uname) in
Darwin)
profiles=( .profile .bash_profile .bashrc .zshrc .config/fish/config.fish )
;;
*)
profiles=( .profile .bashrc .bash_profile .zshrc .config/fish/config.fish )
;;
esac
for profile in "${profiles[@]}"; do
echo_fexists "$HOME/$profile" && break
done
;;

If you can knock that out as well, we can get this merged!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gautamprikshit1
gautamprikshit1 force-pushed the use-zshenv-over-zshrc branch from a133339 to 37db506 Compare January 21, 2024 10:30
@gautamprikshit1
feat: use zshenv over zshrc in setup
ffcab2c
@gautamprikshit1
gautamprikshit1 force-pushed the use-zshenv-over-zshrc branch from 37db506 to ffcab2c Compare January 21, 2024 10:41
chriskrycho
chriskrycho approved these changes Jan 23, 2024
View reviewed changes

@chriskrycho chriskrycho left a comment

Copy link
Copy Markdown
Contributor

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.

Excellent! Much obliged!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chriskrycho
chriskrycho merged commit 8c95b61 into volta-cli:main Jan 23, 2024
@chriskrycho chriskrycho added the enhancement label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chriskrycho chriskrycho chriskrycho approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Target .zshenv over .zshrc

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@gautamprikshit1 @chriskrycho
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.