git
git copied to clipboard
"Operation not permitted" when calling GitDir.fromExisting
I try to run GitDir.fromExisting(path) and i get the following error:
flutter: ProcessException: /bin/sh: /opt/homebrew/bin/git: Operation not permitted
flutter: Command: git rev-parse --git-dir
I'm running the command fine from the Terminal
git rev-parse --git-dir
It seem the macOS app is not permitted to run the process, is there an Entitlement or an other way to fix this that you know of? I have used bookmark to get read/write access to the folder.
It's a macOS app and I'm on macOS 12.6 (21G115)
flutter --version
Flutter 3.3.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision e3c29ec00c (2 weeks ago) • 2022-09-14 08:46:55 -0500
Engine • revision a4ff2c53d8
Tools • Dart 2.18.1 • DevTools 2.15.0
It works if i set the DebugProfile.entitlements com.apple.security.app-sandbox to false
.. but as I'd like to support the app on App Store it need to be in sandbox mode, so i guess this git functionality won't work ..?