microsoft / shell-intune-samples

Sample shell scripts for Intune admins.
MIT License
670 stars 222 forks source link

add || exit #18

Closed marckerr closed 3 years ago

marckerr commented 3 years ago

https://github.com/microsoft/shell-intune-samples/blob/23a69bbfc7551626fe6fb6fa7e080b2e8585a4f9/Apps/Defender/installDefender.sh#L267

Some references suggest using 'cd' with '|| exit' incase CD fails https://github.com/koalaman/shellcheck/wiki/SC2164

theneiljohnson commented 3 years ago

I added a few extra checks in to handle this. Thanks for the feedback.