Using child_process module I'm trying to spawn process which should ask for permissions, but MacOS asks for permissions for parent instead of spawned child.
For example when I'm running code below in terminal, MacOS will ask for permission for "Terminal.app" instead of child. Same thing happens with exec/execFile functions.
Real life example is to remove Microphone permissions from Google Chrome, run code below in Terminal and go to google meet. MacOS will ask for microphone permissions for Terminal.app instead of Google Chrome.
Is it possible to use child_process module and make MacOS ask for permissions for child?
const { spawn } = require("child_process");
const APP_PATH = '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome';
spawn(APP_PATH, [], {
detached: true,
stdio: "ignore",
}).unref();
from MacOS asks for permission to Node parent process instead of child
No comments:
Post a Comment