From c596581be160219bbcc77163eb3d1d86ac82cd7e Mon Sep 17 00:00:00 2001 From: Chris Sosa Date: Thu, 8 Mar 2012 14:44:54 -0800 Subject: [PATCH] Detect if args were passed to image_to_usb, die if they are. build_image interface now only support arg arguments rather than flags. This might be confusing for users who might expect something to happen when they run image_to_usb dev. BUG=chromium-os:27362 TEST=Tested with/without args. Change-Id: If521cb612fa1fa5716fc1557038780a5366e8bab Reviewed-on: https://gerrit.chromium.org/gerrit/17625 Commit-Ready: Chris Sosa Reviewed-by: Chris Sosa Tested-by: Chris Sosa --- image_to_usb.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/image_to_usb.sh b/image_to_usb.sh index 21e7e35f8d..321635495a 100755 --- a/image_to_usb.sh +++ b/image_to_usb.sh @@ -78,6 +78,10 @@ DEFINE_string arch "" \ FLAGS "$@" || exit 1 eval set -- "${FLAGS_ARGV}" +if [ $# -gt 0 ]; then + die "Arguments aren't currently supported in image_to_usb." +fi + # Generates a descriptive string of a removable device. Includes the # manufacturer (if non-empty), product and a human-readable size. function get_disk_string() {