From dbeea200b4b0bd86bd526cbead1ff4ca5e1a419d Mon Sep 17 00:00:00 2001 From: "djmm@google.com" Date: Wed, 18 Nov 2009 02:43:30 +0000 Subject: [PATCH] Mask error if nothing to DEFAULT_FROM. Review URL: http://chromereview.prom.corp.google.com/1188077 git-svn-id: svn://chrome-svn/chromeos/trunk@275 06c00378-0e64-4dae-be16-12b19f9950a1 --- image_to_usb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image_to_usb.sh b/image_to_usb.sh index 9cf517f913..7aa6707d29 100755 --- a/image_to_usb.sh +++ b/image_to_usb.sh @@ -12,7 +12,7 @@ IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images" # Default to the most recent image -DEFAULT_FROM="${IMAGES_DIR}/`ls -t $IMAGES_DIR | head -1`" +DEFAULT_FROM="${IMAGES_DIR}/$(ls -t $IMAGES_DIR 2>&-| head -1)" # Script can be run either inside or outside the chroot. if [ $INSIDE_CHROOT -eq 1 ]