Skip to content

Commit

Permalink
modify to handle a pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed Jun 13, 2024
1 parent 6bb3fb7 commit 9268614
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,8 @@ main() {
fi
}

main

# # execute main only if the script is run directly, not sourced
# if [ "${BASH_SOURCE[0]}" = "$0" ]; then
# main "$@"
# exit $?
# fi
# execute main only if the script is run directly, not sourced
if [[ "${BASH_SOURCE[0]}" == "$0" || "${BASH_EXECUTION_STRING}" == "$0" ]]; then
main "$@"
exit $?
fi

0 comments on commit 9268614

Please sign in to comment.