Browse Source

Fortify against some bad scenarios

Alois Mahdal 9 years ago
parent
commit
5be6c60e15
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/include/pretty.sh

+ 2
- 2
src/include/pretty.sh View File

229
         _pretty__is_internal && continue
229
         _pretty__is_internal && continue
230
         _pretty__is_frontend && echos "$fname" && return 0
230
         _pretty__is_frontend && echos "$fname" && return 0
231
         echo "do not call _pretty_* directly: $fname" >&2
231
         echo "do not call _pretty_* directly: $fname" >&2
232
-        return $FFOO_EXIT_USAGE
232
+        return "$FFOO_EXIT_USAGE"
233
     done
233
     done
234
 }
234
 }
235
 
235
 
310
     # Print command line, launch it and report exit status
310
     # Print command line, launch it and report exit status
311
     #
311
     #
312
     local c=\$
312
     local c=\$
313
-    test $(id -u) -eq 0 && c=\#
313
+    test "$(id -u)" -eq 0 && c="#"
314
     echo "$c $*"
314
     echo "$c $*"
315
     "$@"
315
     "$@"
316
     echo "^ exit status: $?"
316
     echo "^ exit status: $?"