I want to unzip a password protected zip file in windows using nodejs and I'm using tar command to do this via node child process. The problem is, there is a prompt to enter the password but I can't find a way to pass the password that stored in the pwd variable.
const pwd = 'password';
exec(`tar -xf ${filePath}}`,callback);
function callback(err,stdout,stdin){
if(err){
console.log(err);
return;
}