Repository: flutter
Issue: [tool_crash] Flutter crashes when filesystem doesn't support symbolic links
Labels: c: crash,tool,platform-linux,P2,team-tool,triaged-tool

## Command
```sh
flutter pub get
```

## Steps to Reproduce
1. Update dependencies of a project that is located on a filesystem without symlink support (e.g. exFAT)

## Logs
FileSystemException: Cannot create link, OS Error: Operation not permitted, errno = 1
```console
#0      _Link.throwIfError (dart:io/link.dart:339:7)
#1      _Link.createSync (dart:io/link.dart:267:5)
#2      ForwardingLink.createSync (package:file/src/forwarding/forwarding_link.dart:20:16)
#3      ForwardingLink.createSync (package:file/src/forwarding/forwarding_link.dart:20:16)
#4      _createPlatformPluginSymlinks (package:flutter_tools/src/flutter_plugins.dart:985:12)
#5      createPluginSymlinks (package:flutter_tools/src/flutter_plugins.dart:907:5)
#6      refreshPluginsList (package:flutter_tools/src/flutter_plugins.dart:1022:5)
<asynchronous suspension>
#7      FlutterProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:379:5)
<asynchronous suspension>
#8      PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:383:7)
<asynchronous suspension>
#9      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1396:27)
<asynchronous suspension>
#10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
<asynchronous suspension>
#11     CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:372:9)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
<asynchronous suspension>
#14     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:308:5)
<asynchronous suspension>
#15     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:130:9)
```
```console
[✓] Flutter (Channel master, 3.23.0-13.0.pre.25, on Arch Linux 6.8.8-arch1-1, locale en_US.UTF-8)
    • Flutter version 3.23.0-13.0.pre.25 on channel master at $USER/.local/lib/flutter-sdk
    • Upstream repository https://github.com/flutter/flutter
    • Framework revision d4e9b78161 (3 weeks ago), 2024-05-30 07:17:37 -0400
    • Engine revision fb64b9a4e6
    • Dart version 3.5.0 (build 3.5.0-203.0.dev)
    • DevTools version 2.36.0-dev.10

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at $USER/.local/lib/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/linux#android-setup for more details.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 17.0.6
    • cmake version 3.29.5
    • ninja version 1.12.1
    • pkg-config version 2.1.1

[✓] Android Studio (version 2024.1)
    • Android Studio at $USER/.local/share/JetBrains/Toolbox/apps/android-studio
    • 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 17.0.10+0-17.0.10b1087.21-11609105)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1)
    • IntelliJ at $USER/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate-2
    • Flutter plugin version 80.0.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Arch Linux 6.8.8-arch1-1

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

```

## Flutter Application Metadata
**Type**: app
**Version**: 0.0.1+1
**Material**: true
**Android X**: false
**Module**: false
**Plugin**: false
**Android package**: null
**iOS bundle identifier**: null
**Creation channel**: master
**Creation framework version**: 52dc43f34ff9a1eb79419126a110dd698752d583
### Plugins
dynamic_color-1.7.0
file_selector-1.0.3
file_selector_android-0.5.0+7
file_selector_ios-0.5.1+8
file_selector_linux-0.9.2+1
file_selector_macos-0.9.3+3
file_selector_web-0.9.4+1
file_selector_windows-0.9.3+1
flutter_local_notifications-17.0.0
flutter_native_splash-2.4.0
flutter_plugin_android_lifecycle-2.0.17
image_picker-1.0.7
image_picker_android-0.8.9+5
image_picker_for_web-3.0.3
image_picker_ios-0.8.9+2
image_picker_linux-0.2.1+1
image_picker_macos-0.2.1+1
image_picker_windows-0.2.1+1
integration_test
package_info_plus-6.0.0
path_provider-2.1.2
path_provider_android-2.2.2
path_provider_foundation-2.3.2
path_provider_linux-2.2.1
path_provider_windows-2.2.1
share_plus-8.0.2
shared_preferences-2.2.2
shared_preferences_android-2.2.1
shared_preferences_foundation-2.3.5
shared_preferences_linux-2.3.2
shared_preferences_web-2.3.0
shared_preferences_windows-2.3.2
url_launcher-6.2.5
url_launcher_android-6.3.0
url_launcher_ios-6.2.5
url_launcher_linux-3.1.1
url_launcher_macos-3.1.0
url_launcher_web-2.3.0
url_launcher_windows-3.1.1
video_player-2.8.5
video_player_android-2.4.12
video_player_avfoundation-2.5.6
video_player_web-2.3.0
wakelock_plus-1.2.3