Skip to content

Conversation

@jakaskerl
Copy link
Contributor

Change MacOS install command to
curl -fL https://docs.luxonis.com/install_dependencies.sh | bash.

Reason:

  • Install command on linux is now more similar
  • Error on MacOS due to:

Direct Execution (bash script.sh): When you run the script directly, any error triggers the trap, prints the custom message, and then exits. However, in a directly executed script, certain errors might be handled or bypassed differently due to explicit error handling within the script itself or because the script context allows it to continue past errors under certain conditions.

Execution via bash -c: When you execute the script with bash -c "$(curl -fL https://docs.luxonis.com/install_dependencies.sh)", the entire script is passed to Bash as a single command argument. In this context, the ERR trap's behavior is more immediate and global. Since the script is being treated as one continuous command, any trapped error will cause the entire command to exit, as the context is more sensitive to errors given its one-off execution nature.

The bash on mac has issues with line ["trixie/sid"]="13" as it read "/" as a division. The error is harmless and can be ignored since the line is not accessed anyway.

Change MacOS install command to 
`curl -fL https://docs.luxonis.com/install_dependencies.sh | bash`.

Reason: 
- Install command on linux is now more similar
- Error on MacOS due to:

>     Direct Execution (`bash script.sh`): When you run the script directly, any error triggers the trap, prints the custom message, and then exits. However, in a directly executed script, certain errors might be handled or bypassed differently due to explicit error handling within the script itself or because the script context allows it to continue past errors under certain conditions.

 >    Execution via bash -c: When you execute the script with `bash -c "$(curl -fL https://docs.luxonis.com/install_dependencies.sh)"`, the entire script is passed to Bash as a single command argument. In this context, the `ERR` trap's behavior is more immediate and global. Since the script is being treated as one continuous command, any trapped error will cause the entire command to exit, as the context is more sensitive to errors given its one-off execution nature.

The bash on mac has issues with line `["trixie/sid"]="13"` as it read "/" as a division. The error is harmless and can be ignored since the line is not accessed anyway.
@jakaskerl jakaskerl requested a review from Erol444 March 7, 2024 16:23
@jakaskerl
Copy link
Contributor Author

@Erol444 LMK if there was a reason why the command is different/ if there is an instance where this would not work.

Copy link
Contributor

@Erol444 Erol444 left a comment

Choose a reason for hiding this comment

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

I am not sure tbh. Let's get it merged tho

@jakaskerl jakaskerl merged commit f190ba1 into main Mar 7, 2024
@jakaskerl jakaskerl deleted the docs/update-install branch March 7, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants