code100x / cms

Repo for https://app.100xdevs.com/
https://app.100xdevs.com/
MIT License
1.3k stars 1.83k forks source link

bug: Bash file optimization #1817

Open jangirvipin opened 3 weeks ago

jangirvipin commented 3 weeks ago

Describe the bug As of now there is no error handling in setup.sh file . Like these command can fail and our setup will not work if we dont do error handling in setup.sh .

To Reproduce Steps to reproduce the behavior:

  1. Navigate to setup.sh
  2. docker command dont have error handling , so it can be failed .

Expected behavior These commands should be properly handled .

Screenshots or GIFs None

Info (please complete the following information):

Additional context None

jangirvipin commented 3 weeks ago

Hey you can also do something like this

if [[ $? -ne 0 ]] for checking if previous command fails instead of current approach . but both are fine