Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2396)

Unified Diff: bin/cros_overlay_list

Issue 3084028: Add check for spaces in board and variant names. (Closed) Base URL: ssh://git@chromiumos-git/crosutils.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_overlay_list
diff --git a/bin/cros_overlay_list b/bin/cros_overlay_list
index 1d768663e922cab082796f51466a27da862ad618..1867da25a6761231fa4c09306f57dc1d0b31ebf4 100755
--- a/bin/cros_overlay_list
+++ b/bin/cros_overlay_list
@@ -30,13 +30,13 @@ if [ -z "$FLAGS_board" ] ; then
exit 1
fi
-if [[ "$FLAGS_board" =~ "_" ]] ; then
- error "--board name must not contain an underscore (_)."
+if [[ $FLAGS_board =~ [_\ ] ]] ; then
+ error "--board name must not contain an underscore (_) or a space ( )."
exit 1
fi
-if [[ "$FLAGS_variant" =~ "_" ]] ; then
- error "--variant name must not contain an underscore (_)."
+if [[ $FLAGS_variant =~ [_\ ] ]] ; then
+ error "--variant name must not contain an underscore (_) or a space ( )."
exit 1
fi
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698