2
依存関係をインストールする必要があるElectronアプリケーションを開発しています。
パッケージsudo-promptが部分的に機能しなくなりました。
マイコード:Linux上でElectronを使用して依存関係をインストールする
const sudo = require("sudo-prompt");
sudo.exec("apt-get install lib32gcc1", {name: "SteamCMD GUI"}, (error, stdout, stderr) => {
// The code here doesn't execute, as it possibly waits for the user's confirmation to press Y and Enter
});
と依存インストールされることは決してありません。
どうすれば解決できますか?
ありがとうございます!
const sudo = require("sudo-prompt");// The -y did the trick
sudo.exec("apt-get install lib32gcc1 -y", {name: "SteamCMD GUI"}, (error, stdout, stderr) => {
// The code here doesn't execute, as it possibly waits for the user's confirmation to press Y and Enter
});
-y
オプションはapt-get
はプロンプトをスキップします: