I use exec commands in Ubuntu very offten, I use it with promisify:
import { exec } from 'child_process'
const execFunction = promisify(exec)
Then when I run a command like:
await execFunction('sudo ufw status')
That command will ask me a password, the thing is I can't answer any question (like the question for the password) when using that command, so my question is: is there any way to pass an answer or something like that for the exec
command?