diff --git a/bin/flutter.bat b/bin/flutter.bat index 4b0ebbb5d7b..4d8580e50d8 100644 --- a/bin/flutter.bat +++ b/bin/flutter.bat @@ -12,6 +12,8 @@ SET script_path=%flutter_tools_dir%\bin\flutter_tools.dart REM TODO: Don't require dart to be on the user's path SET dart=dart +REM Set current working directory to the flutter directory +PUSHD %flutter_root% REM IF doesn't have an "or". Instead, just use GOTO FOR /f %%r IN ('git rev-parse HEAD') DO SET revision=%%r IF NOT EXIST %snapshot_path% GOTO do_snapshot @@ -34,10 +36,11 @@ CALL pub.bat get CD "%flutter_root%" CALL %dart% --snapshot="%snapshot_path%" --package-root="%flutter_tools_dir%\packages" "%script_path%" "%stamp_path%" -goto :eof :after_snapshot +REM Go back to last working directory +POPD CALL %dart% "%snapshot_path%" %* IF /I "%ERRORLEVEL%" EQU "253" ( diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index 69b24bca83b..30a693a0beb 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -509,7 +509,7 @@ class AndroidDevice extends Device { // 015d172c98400a03 device usb:340787200X product:nakasi model:Nexus_7 device:grouper RegExp deviceRegex1 = new RegExp( - r'^(\S+)\s+device\s+\S+\s+product:(\S+)\s+model:(\S+)\s+device:(\S+)$'); + r'^(\S+)\s+device\s+.*product:(\S+)\s+model:(\S+)\s+device:(\S+)$'); // 0149947A0D01500C device usb:340787200X RegExp deviceRegex2 = new RegExp(r'^(\S+)\s+device\s+\S+$');