| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Thanks for the PR. I think we can also improve some of the messaging on install.sh. We'll check this out over the next few days. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Why
The PATH environment variable does not get updated after running the install.sh script,

As a result the user would have to manually source the shell configuration file in order to update the environment variables or open a new terminal session.
Even though the below conditional statement to source the configuration file is present in install.sh at the end of file
But it won't work (in some cases it will) because shell scripts by default run in a non interactive shell and source command only works when the shell is in interactive mode. Which means the environment variables declared or updated while running the install.sh file won't be reflected in the user's shell.
What is changing
A case statement has been added below the previous command which was used to run install.sh so that the configuration can be sourced in the interactive shell and the environment variables are updated in the same shell instance.
Why did I use this approach to check shell type?
You might notice I used "$SHELL" in *bash* approach which basically is checking a sub string instead of explicitly doing $SHELL=="/bin/bash"
This approach have some added advantages to it instead of explicit check of shell path'
How to test
To test you will first need to uninstall the existing install (if present) using
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/uninstall.sh)" and load the latest shell configuration using the above command we used before.
Verify that the assemblyai is not within the PATH entering it on terminal
Now Install the script again using /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/AssemblyAI/assemblyai-cli/main/install.sh)" and run the command for loading the shell configuration we used before.
As you can see below it updated the environment variable and now the user can access the assemblyai
