I'm trying to run a shell script with sudo access which executes a python script using Node.js on Mac. This was a big help How to run shell script file using nodejs? but I've gotten stuck:
Shell script:
#!/bin/sh
sudo -S python [pathToPythonScript]/someScripts.py
Node.js code:
const shell = require('shelljs');
shell.exec("./[pathToShellScript]");
When I run this in WebStorm, I am prompted to enter my password. I do so, but nothing happens; the script isn't executed. Can anybody help me with this?