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

MacOS Chrome Launcher Script missing .zshrc Handling and Script Sourcing #356

Closed
gagan0123 opened this issue Dec 22, 2023 · 3 comments
Closed
Assignees
Labels
bug Something isn't working P2 Low priority
Milestone

Comments

@gagan0123
Copy link
Collaborator

Describe the bug
When launching the Chrome launcher script on MacOS as per the instructions in the Wiki, encountered issues if a .zshrc file does not exist in the home directory. Additionally, the chrome_launcher.sh script does not automatically source, requiring us to manually source it or open a new shell for the commands to become available.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to 'Terminal' on MacOS.
  2. Enter the command curl -sL https://rt.cx/psat | bash.
  3. Notice the errors related to the missing .zshrc file (only occurs if that file does not exist).
  4. Attempt to run the command chrome-default to launch Chrome.
  5. See the error that commands are not found or available.

Expected behaviour
The expected behaviour is that after running the script, Chrome laucher commands should be available immediately without the need for manual sourcing or opening a new shell. Additionally, there should be a check for, when a .zshrc file is not present to avoid errors.

Screencast

Screencast

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Version: Version 120.0.6099.129 (Official Build) (arm64)
  • ZSH: zsh 5.9 (x86_64-apple-darwin23.0)
@gagan0123 gagan0123 added bug Something isn't working P2 Low priority labels Dec 22, 2023
@maitreyie-chavan maitreyie-chavan added this to the v0.5.0 milestone Dec 22, 2023
@MiteshShah
Copy link
Collaborator

MiteshShah commented Dec 22, 2023

wget -qO /tmp/psat https://rt.cx/psat && source /tmp/psat

This will do the trick but on Mac OS wget needed to be installed.

curl -sL https://rt.cx/psat | bash

curl are by default available but its won't source parent i.e from TTY we executed above curl its create sub-shell and run script and source inside that sub-shell not parent shell TTY.

Let me know your thought on this.
cc @gagan0123

@gagan0123
Copy link
Collaborator Author

As per the discussion with @MiteshShah, we concluded that adding help instruction after the install script finishes is the best solution. So added help text as mentioned here: #211 (comment)

image

@maitreyie-chavan
Copy link
Collaborator

Addressed and released as a part of v0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 Low priority
Projects
Status: Done
Development

No branches or pull requests

3 participants