Updated SC2103 (markdown)

koalaman
2015-08-15 14:07:13 -07:00
parent 70315713b7
commit 448233b881

@@ -1,4 +1,4 @@
# Consider using ( subshell ), 'cd foo||exit', or pushd/popd instead. # Use a ( subshell ) to avoid having to cd back.
### Problematic code: ### Problematic code:
@@ -24,7 +24,7 @@ or
for dir in */ for dir in */
do do
cd "$dir" || continue cd "$dir" || exit
convert index.png index.jpg convert index.png index.jpg
cd .. cd ..
done done
@@ -39,4 +39,4 @@ Check `cd`s exit status and/or use subshells to limit the effects of `cd`.
### Exceptions ### Exceptions
None known. If you set variables you can't use a subshell. In that case, you should definitely check the exit status of `cd`, which will also silence this suggestion.