Repository: firebase/firebase-ios-sdk (language: cpp)

Issue:
run script doesn't upload dsym files when <paths> parameter passed
### Description

When I try to upload multiple dsym files with <paths> parameter using run, it doesn't start uploading at all. I see this output in the build logs:

Showing All Messages, Filtering for "dsym".
DSYM Paths: ["my.dSYM", "myother.dSYM", "--build-phase ", "--validate"]

When I change these lines in the run script:
```
VALIDATE_ARGUMENTS="$ARGUMENTS --build-phase --validate"
UPLOAD_ARGUMENTS="$ARGUMENTS --build-phase"
```
to
```
VALIDATE_ARGUMENTS="--build-phase --validate $ARGUMENTS"
UPLOAD_ARGUMENTS="--build-phase $ARGUMENTS"
```
it works, since the <paths> parameter should be the last parameter.

### Reproducing the issue

Call the run scirpt with a paths parameter to point another dSYM file.

### Firebase SDK Version

11.4

### Xcode Version

16

### Installation Method

CocoaPods

### Firebase Product(s)

Crashlytics

### Targeted Platforms

iOS

### Relevant Log Output

```shell
Showing All Messages, Filtering for "dsym".
DSYM Paths: ["/Users/osrl/Library/Developer/Xcode/DerivedData/MonoChat-bnvacbqslsvvixekiyryrsoiawlx/Build/Products/Debug-iphonesimulator/MonoChat-Debug.app.dSYM", "/Users/osrl/Library/Developer/Xcode/DerivedData/MonoChat-bnvacbqslsvvixekiyryrsoiawlx/Build/Products/Debug-iphonesimulator/MonoChatShared.framework.dSYM", "--build-phase", "--validate"]
```


### If using Swift Package Manager, the project's Package.resolved

<!--- Look below for instructions on how to share your Package.resolved. --->

<details>
<summary>Expand <code>Package.resolved</code> snippet</summary>
<br>

```json

Replace this line with the contents of your Package.resolved.

```

</details>


### If using CocoaPods, the project's Podfile.lock

<!--- Look below for instructions on how to share your Podfile.lock. --->

<details>
<summary>Expand <code>Podfile.lock</code> snippet</summary>
<br>

```yml

PODS:
  - FirebaseAnalytics (11.4.0):
    - FirebaseAnalytics/AdIdSupport (= 11.4.0)
    - FirebaseCore (~> 11.0)
    - FirebaseInstallations (~> 11.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    - GoogleUtilities/MethodSwizzler (~> 8.0)
    - GoogleUtilities/Network (~> 8.0)
    - "GoogleUtilities/NSData+zlib (~> 8.0)"
    - nanopb (~> 3.30910.0)
  - FirebaseAnalytics/AdIdSupport (11.4.0):
    - FirebaseCore (~> 11.0)
    - FirebaseInstallations (~> 11.0)
    - GoogleAppMeasurement (= 11.4.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    - GoogleUtilities/MethodSwizzler (~> 8.0)
    - GoogleUtilities/Network (~> 8.0)
    - "GoogleUtilities/NSData+zlib (~> 8.0)"
    - nanopb (~> 3.30910.0)
  - FirebaseCore (11.4.2):
    - FirebaseCoreInternal (< 12.0, >= 11.4.2)
    - GoogleUtilities/Environment (~> 8.0)
    - GoogleUtilities/Logger (~> 8.0)
  - FirebaseCoreExtension (11.4.1):
    - FirebaseCore (~> 11.0)
  - FirebaseCoreInternal (11.4.2):
    - "GoogleUtilities/NSData+zlib (~> 8.0)"
  - FirebaseCrashlytics (11.4.0):
    - FirebaseCore (~> 11.4)
    - FirebaseInstallations (~> 11.0)
    - FirebaseRemoteConfigInterop (~> 11.0)
    - FirebaseSessions (~> 11.0)
    - GoogleDataTransport (~> 10.0)
    - GoogleUtilities/Environment (~> 8.0)
    - nanopb (~> 3.30910.0)
    - PromisesObjC (~> 2.4)
  - FirebaseInstallations (11.4.0):
    - FirebaseCore (~> 11.0)
    - GoogleUtilities/Environment (~> 8.0)
    - GoogleUtilities/UserDefaults (~> 8.0)
    - PromisesObjC (~> 2.4)
  - FirebaseRemoteConfigInterop (11.4.0)
  - FirebaseSessions (11.4.0):
    - FirebaseCore (~> 11.4)
    - FirebaseCoreExtension (~> 11.4)
    - FirebaseInstallations (~> 11.0)
    - GoogleDataTransport (~> 10.0)
    - GoogleUtilities/Environment (~> 8.0)
    - GoogleUtilities/UserDefaults (~> 8.0)
    - nanopb (~> 3.30910.0)
    - PromisesSwift (~> 2.1)
  - GoogleAppMeasurement (11.4.0):
    - GoogleAppMeasurement/AdIdSupport (= 11.4.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    - GoogleUtilities/MethodSwizzler (~> 8.0)
    - GoogleUtilities/Network (~> 8.0)
    - "GoogleUtilities/NSData+zlib (~> 8.0)"
    - nanopb (~> 3.30910.0)
  - GoogleAppMeasurement/AdIdSupport (11.4.0):
    - GoogleAppMeasurement/WithoutAdIdSupport (= 11.4.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    - GoogleUtilities/MethodSwizzler (~> 8.0)
    - GoogleUtilities/Network (~> 8.0)
    - "GoogleUtilities/NSData+zlib (~> 8.0)"
    - nanopb (~> 3.30910.0)
  - GoogleAppMeasurement/WithoutAdIdSupport (11.4.0):
    - GoogleUtilities/AppDelegateSwizzler (~> 8.0)
    - GoogleUtilities/MethodSwizzler (~> 8.0)
    - GoogleUtilities/Network (~> 8.0)
    - "GoogleUtilities/NSData+zlib (~> 8.0)"
    - nanopb (~> 3.30910.0)
  - GoogleDataTransport (10.1.0):
    - nanopb (~> 3.30910.0)
    - PromisesObjC (~> 2.4)
  - GoogleUtilities/AppDelegateSwizzler (8.0.2):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
    - GoogleUtilities/Privacy
  - GoogleUtilities/Environment (8.0.2):
    - GoogleUtilities/Privacy
  - GoogleUtilities/Logger (8.0.2):
    - GoogleUtilities/Environment
    - GoogleUtilities/Privacy
  - GoogleUtilities/MethodSwizzler (8.0.2):
    - GoogleUtilities/Logger
    - GoogleUtilities/Privacy
  - GoogleUtilities/Network (8.0.2):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Privacy
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (8.0.2)":
    - GoogleUtilities/Privacy
  - GoogleUtilities/Privacy (8.0.2)
  - GoogleUtilities/Reachability (8.0.2):
    - GoogleUtilities/Logger
    - GoogleUtilities/Privacy
  - GoogleUtilities/UserDefaults (8.0.2):
    - GoogleUtilities/Logger
    - GoogleUtilities/Privacy
  - KMPNativeCoroutinesAsync (1.0.0-ALPHA-34):
    - KMPNativeCoroutinesCore (= 1.0.0-ALPHA-34)
  - KMPNativeCoroutinesCore (1.0.0-ALPHA-34)
  - KMPObservableViewModelCore (1.0.0-BETA-4):
    - KMPObservableViewModelCoreObjC (= 1.0.0-BETA-4)
  - KMPObservableViewModelCoreObjC (1.0.0-BETA-4)
  - KMPObservableViewModelSwiftUI (1.0.0-BETA-4):
    - KMPObservableViewModelCore (= 1.0.0-BETA-4)
  - linphone-sdk-novideo (5.3.92)
  - lottie-ios (4.5.0)
  - MijickPopupView (2.7.1)
  - nanopb (3.30910.0):
    - nanopb/decode (= 3.30910.0)
    - nanopb/encode (= 3.30910.0)
  - nanopb/decode (3.30910.0)
  - nanopb/encode (3.30910.0)
  - OneSignalXCFramework (3.12.10):
    - OneSignalXCFramework/OneSignalCore (= 3.12.10)
    - OneSignalXCFramework/OneSignalExtension (= 3.12.10)
    - OneSignalXCFramework/OneSignalOutcomes (= 3.12.10)
  - OneSignalXCFramework/OneSignalCore (3.12.10)
  - OneSignalXCFramework/OneSignalExtension (3.12.10):
    - OneSignalXCFramework/OneSignalCore
    - OneSignalXCFramework/OneSignalOutcomes
  - OneSignalXCFramework/OneSignalOutcomes (3.12.10):
    - OneSignalXCFramework/OneSignalCore
  - PromisesObjC (2.4.0)
  - PromisesSwift (2.4.0):
    - PromisesObjC (= 2.4.0)

DEPENDENCIES:
  - FirebaseAnalytics
  - FirebaseCrashlytics
  - KMPNativeCoroutinesAsync (= 1.0.0-ALPHA-34)
  - KMPObservableViewModelSwiftUI (= 1.0.0-BETA-4)
  - linphone-sdk-novideo (~> 5.3.90)
  - lottie-ios
  - MijickPopupView
  - OneSignalXCFramework (~> 3.12.9)

SPEC REPOS:
  https://github.com/CocoaPods/Specs.git:
    - FirebaseAnalytics
    - FirebaseCore
    - FirebaseCoreExtension
    - FirebaseCoreInternal
    - FirebaseCrashlytics
    - FirebaseInstallations
    - FirebaseRemoteConfigInterop
    - FirebaseSessions
    - GoogleAppMeasurement
    - GoogleDataTransport
    - GoogleUtilities
    - KMPNativeCoroutinesAsync
    - KMPNativeCoroutinesCore
    - KMPObservableViewModelCore
    - KMPObservableViewModelCoreObjC
    - KMPObservableViewModelSwiftUI
    - lottie-ios
    - MijickPopupView
    - nanopb
    - OneSignalXCFramework
    - PromisesObjC
    - PromisesSwift
  https://gitlab.linphone.org/BC/public/podspec.git:
    - linphone-sdk-novideo

SPEC CHECKSUMS:
  FirebaseAnalytics: 3feef9ae8733c567866342a1000691baaa7cad49
  FirebaseCore: 6b32c57269bd999aab34354c3923d92a6e5f3f84
  FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e
  FirebaseCoreInternal: 35731192cab10797b88411be84940d2beb33a238
  FirebaseCrashlytics: 41bbdd2b514a8523cede0c217aee6ef7ecf38401
  FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414
  FirebaseRemoteConfigInterop: e76f46ffa4d6a65e273d4dfebb6a79e588cec136
  FirebaseSessions: 3f56f177d9e53a85021d16b31f9a111849d1dd8b
  GoogleAppMeasurement: 987769c4ca6b968f2479fbcc9fe3ce34af454b8e
  GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
  GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
  KMPNativeCoroutinesAsync: 709d922d3c8db3b83c5f0ce4035123dd7e6187b1
  KMPNativeCoroutinesCore: 7e18aa574381ab40ea6a5b90ec2dffd362c0082b
  KMPObservableViewModelCore: ded4abdfcc3566844c8dd18e23accd5cacd89a91
  KMPObservableViewModelCoreObjC: d74dbf0c84cb8f66d6c706e89add1df9b8f653f4
  KMPObservableViewModelSwiftUI: c3f740105ba32cd964cab1794d631b759d76a1d0
  linphone-sdk-novideo: 50b8bcad0511613eca167586e75858f03cbaeb03
  lottie-ios: a881093fab623c467d3bce374367755c272bdd59
  MijickPopupView: 54863e093a18d6435cd5068850414570f9c1ba07
  nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
  OneSignalXCFramework: e458f7a374192598a1d66418e1b61481c3cdf0e9
  PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
  PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851

PODFILE CHECKSUM: 4a3c4d0cf9b5f244d507d3ec13bca26d8124fa8b

COCOAPODS: 1.15.2


```

</details>



Discussion / hints:
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

Fix patch:
diff --git a/Crashlytics/run b/Crashlytics/run
index 93a6f11e7ae..bb1d43d8f0f 100755
--- a/Crashlytics/run
+++ b/Crashlytics/run
@@ -46,8 +46,8 @@ for i in "$@"; do
   ARGUMENTS="$ARGUMENTS \"$i\""
 done
 
-VALIDATE_ARGUMENTS="$ARGUMENTS --build-phase --validate"
-UPLOAD_ARGUMENTS="$ARGUMENTS --build-phase"
+VALIDATE_ARGUMENTS="--build-phase --validate $ARGUMENTS"
+UPLOAD_ARGUMENTS="--build-phase $ARGUMENTS "
 
 # Quote the path to handle folders with special characters
 COMMAND_PATH="\"$DIR/upload-symbols\" "


Test patch: