Updated SC2164 (markdown)

smkent
2016-07-19 20:33:26 -07:00
parent 7ef18bcb54
commit e3bdf7fbe6

@@ -29,7 +29,7 @@ func(){
`cd` can fail for a variety of reasons: misspelled paths, missing directories, missing permissions, broken symlinks and more.
If/when it does, the script will keep going and do all its operations in the wrong direction. This can be messy, especially if the operations involve creating or deleting a lot of files.
If/when it does, the script will keep going and do all its operations in the wrong directory. This can be messy, especially if the operations involve creating or deleting a lot of files.
You should therefore always check the condition of `cd`, either with `|| exit` as suggested, or things like `if cd somewhere; then ...; fi`.