Repository: flutter
Issue: [tool_crash] FileSystemException: Cannot copy file to '/Users/user215378/Documents/flutter/bin/cache/artifacts/engine/ios/LICENSE', OS Error: No such file or directory, errno = 2
Labels: c: crash,tool,P2,team-tool,triaged-tool

## Command
```
flutter --no-color run --machine --track-widget-creation --device-id=484AB090-B3DA-4AD5-8F3F-D2CF66B76B32 --start-paused --dart-define=flutter.inspector.structuredErrors=true lib/main.dart
```

## Steps to Reproduce
1. ...
2. ...
3. ...

## Logs
FileSystemException: Cannot copy file to '/Users/user215378/Documents/flutter/bin/cache/artifacts/engine/ios/LICENSE', OS Error: No such file or directory, errno = 2
```
#0      _File.copy.<anonymous closure> (dart:io/file_impl.dart:328:9)
#1      _rootRunUnary (dart:async/zone.dart:1434:47)
<asynchronous suspension>
#2      ForwardingFile.copy (package:file/src/forwarding/forwarding_file.dart:26:51)
<asynchronous suspension>
#3      ForwardingFile.copy (package:file/src/forwarding/forwarding_file.dart:26:51)
<asynchronous suspension>
#4      EngineCachedArtifact.updateInner (package:flutter_tools/src/cache.dart:926:7)
<asynchronous suspension>
#5      CachedArtifact.update (package:flutter_tools/src/cache.dart:812:5)
<asynchronous suspension>
#6      Cache.updateAll (package:flutter_tools/src/cache.dart:681:9)
<asynchronous suspension>
#7      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1272:7)
<asynchronous suspension>
#8      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1161:27)
<asynchronous suspension>
#9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10     CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#11     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
<asynchronous suspension>
#12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
```
```
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.1 21C52 darwin-x64, locale en-US)
    • Flutter version 2.10.3 at /Users/user215378/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (12 days ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/user215378/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[!] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.63.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.36.0

[✓] Connected device (2 available)
    • iPhone Xs Max (mobile) • 484AB090-B3DA-4AD5-8F3F-D2CF66B76B32 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 99.0.4844.51

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.

```

## Flutter Application Metadata
**Type**: app
**Version**: 1.0.0+1
**Material**: true
**Android X**: false
**Module**: false
**Plugin**: false
**Android package**: null
**iOS bundle identifier**: null
**Creation channel**: stable
**Creation framework version**: 7e9793dee1b85a243edd0e06cb1658e98b077561