-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Make export.fish exit with SUCCESS exit code (IDFGH-9460) #10828
Conversation
The export.fish script exits with an exit code of 4. Thus, any shell checks that make sure the source command exits successfully always failed. This was due to the last line trying to erase the __main function. In fish, you can't erase a function using the `set` command, you can only erase variables. By removing that line the script now exits with an exit code of 0 instead of 4.
Remove the unused `unset` function in export.fish. The author of the script decided to simply use `set -e` instead so the function was never used
Thanks for your contribution. |
@maxslarsson Thanks for your contribution! On the other hand, I had to remove you commit Remove unused unset function in export.fish. This function is used when users are switching from one ESP-IDF version to another in opened terminal. One of subcommand in export script then generate sequence of commands with keyword |
Ahh I see! Thank you for letting me know and for taking the time to review my changes. Let me know if I can do anything else! |
The export.fish script exits with an exit code of 4. Thus, any shell checks that make sure the source command exits successfully always failed. This was due to the last line trying to erase the __main function. In fish, you can't erase a function using the `set` command, you can only erase variables. By removing that line the script now exits with an exit code of 0 instead of 4. Erase __main function at the end of export.fish Closes #10828
The export.fish script exits with an exit code of 4. Thus, any shell checks that make sure the source command exits successfully always failed. This was due to the last line trying to erase the __main function. In fish, you can't erase a function using the `set` command, you can only erase variables. By removing that line the script now exits with an exit code of 0 instead of 4. Erase __main function at the end of export.fish Closes #10828
The export.fish script currently exits with an exit code of 4. Thus, any checks that make sure the
source
command exited successfully (exit code equal to zero) always fail. This was due to the last line trying to erase the__main
function using theset -e
command. In fish, you can only erase variables using theset
command. By changing the last line to erase the__main
function with thefunctions -e
command, the script now exits with an exit code of 0 instead of 4.Also, while looking at the script, I noticed that the
unset
function seemed to be unused. My understanding was that the author of the script opted to directly use theset -e
command in the script instead of theunset
function, leaving it unused.