johnlindquist / kit

Script Kit. Automate Anything.
https://scriptkit.com
MIT License
3.91k stars 138 forks source link

Running sudo commands #1199

Closed ElTacitos closed 1 year ago

ElTacitos commented 1 year ago

Hey,

I am trying to run a commands which needs to run as sudo in order to work (pmset).

await $`sudo pmset -a displaysleep 3`

When I run this script I get the following error:

[warn]  Error: sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

Where am I supposed to put the -S option ?