From 4f05643cac4c34d6d7b4d60dceb7047a4d31a192 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 8 Feb 2017 19:27:11 -0800 Subject: [PATCH] Support flutter install paths containing spaces (#8014) --- bin/flutter | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/flutter b/bin/flutter index 804bac0536..3f6334d26b 100755 --- a/bin/flutter +++ b/bin/flutter @@ -30,10 +30,10 @@ function follow_links() { # Convert a filesystem path to a format usable by Dart's URI parser. function path_uri() { # Reduce multiple leading slashes to a single slash. - echo $1 | sed -E -e "s,^/+,/," + echo "$1" | sed -E -e "s,^/+,/," } -PROG_NAME="$(path_uri $(follow_links "$BASH_SOURCE"))" +PROG_NAME="$(path_uri "$(follow_links "$BASH_SOURCE")")" BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" export FLUTTER_ROOT="$(cd "${BIN_DIR}/.." ; pwd -P)"