Repository: flutter
Issue: [tool_crash] FileSystemException: Getting current working directory failed, OS Error: No such file or directory, errno = 2
Labels: c: crash,tool,P2,team-tool,triaged-tool

## Command
```
flutter run --target lib/dev_main.dart --flavor dev -d [iPhone Xs Max iOS 14.2 18B5052h]
```

## Steps to Reproduce
1. just ```flutter run```
Its ok when my device iOS 14.0 GM with Flutter 1.20.4

## Logs
FileSystemException: Getting current working directory failed, OS Error: No such file or directory, errno = 2
```
#0      _Directory.current (dart:io/directory_impl.dart:42:7)
#1      Directory.current (dart:io/directory.dart:159:25)
#2      LocalFileSystem.currentDirectory (package:file/src/backends/local/local_file_system.dart:44:60)
#3      ForwardingFileSystem.currentDirectory (package:file/src/forwarding/forwarding_file_system.dart:38:46)
#4      FlutterCommand.validateCommand (package:flutter_tools/src/runner/flutter_command.dart:956:67)
#5      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:338:19)
#6      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:836:11)
<asynchronous suspension>
#7      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:741:33)
<asynchronous suspension>
#8      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart)
#9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#10     _rootRun (dart:async/zone.dart:1190:13)
#11     _CustomZone.run (dart:async/zone.dart:1093:19)
#12     _runZoned (dart:async/zone.dart:1630:10)
#13     runZoned (dart:async/zone.dart:1550:10)
#14     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
#15     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:730:20)
#16     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#17     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:332:21)
<asynchronous suspension>
#18     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart)
#19     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#20     _rootRun (dart:async/zone.dart:1190:13)
#21     _CustomZone.run (dart:async/zone.dart:1093:19)
```
```
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021, locale zh-Hans-CN)
    • Flutter version 1.20.4 at /Users/iwpz/Documents/flutter
    • Framework revision fba99f6cf9 (6 days ago), 2020-09-14 15:32:52 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/iwpz/Library/Android/sdk
    • Platform android-30, build-tools 29.0.3
    • ANDROID_HOME = /Users/iwpz/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0, Build version 12A7209
    ✗ CocoaPods installed but not working.
        You appear to have CocoaPods installed but it is not working.
        This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
        This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.
      To re-install CocoaPods, run:
        sudo gem install cocoapods

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.49.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1

[✓] Connected device (3 available)
    • iWPZ-iPhone Xs Max (mobile)         • [my device id]            • ios • iOS 14.2
    • iPhone 11 Pro Max (mobile)          • A34EEB3D-E006-4D03-8A39-2A7A0F10E584 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
    • iPhone SE (2nd generation) (mobile) • 3B080B47-2D7D-4A92-9E66-FF5F34B796B6 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)

! Doctor found issues in 1 category.

```

## Flutter Application Metadata
FileSystemException: Getting current working directory failed, path = '' (OS Error: No such file or directory, errno = 2)

## 

Infact, Thats my ```flutter doctor``` run in terminal

[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021, locale
    zh-Hans-CN)
    • Flutter version 1.20.4 at /Users/iwpz/Documents/flutter
    • Framework revision fba99f6cf9 (6 days ago), 2020-09-14 15:32:52 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/iwpz/Library/Android/sdk
    • Platform android-30, build-tools 29.0.3
    • ANDROID_HOME = /Users/iwpz/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0, Build version 12A7209
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.49.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1

[✓] Connected device (3 available)
    • iWPZ-iPhone Xs Max (mobile)         • [my device ID]
      • ios • iOS 14.2
    • iPhone 11 Pro Max (mobile)          • A34EEB3D-E006-4D03-8A39-2A7A0F10E584
      • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
    • iPhone SE (2nd generation) (mobile) • 3B080B47-2D7D-4A92-9E66-FF5F34B796B6
      • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)