How to package from Terminal in MacOS

I’m trying to package my project using the following command:

"$UNREAL_ROOT/Engine/Build/BatchFiles/RunUAT.sh" BuildCookRun -project="$WORKSPACE/$PROJECT_NAME/$PROJECT_NAME.uproject" -noP4 -platform=Mac -clientconfig=$BUILD_CONFIGURATION -cook -allmaps -build -stage -pak -archive -archivedirectory="$TEMP_DIR"

with BUILD_CONFIGURATION=Shipping

however at the end of the building process I’m getting this error:

BUILD FAILED: /Users/administrator/YCE/BaseProject/Binaries/Mac/UE4Editor-BaseProject.dSYM was in manifest but was not produced.
AutomationTool exiting with ExitCode=1 (Error_Unknown)
RunUAT ERROR: AutomationTool was unable to run successfully.

I’m wondering if I’m missing a flag for the command or maybe some setting on the project so It’ll generate the DSYM file

Any luck on this issue?
I’m having the same issue with my project.
Although it is set to generate dsym in the UE5 Editor, it always fails.

Hey, just solved this issue by adding these 2 lines bellow to my .Target.cs files.