diff --git a/ElectronNET.CLI/Commands/BuildCommand.cs b/ElectronNET.CLI/Commands/BuildCommand.cs index 4a91cd7..e46e6ff 100644 --- a/ElectronNET.CLI/Commands/BuildCommand.cs +++ b/ElectronNET.CLI/Commands/BuildCommand.cs @@ -86,7 +86,11 @@ namespace ElectronNET.CLI.Commands if (Directory.Exists(electronhosthookDir)) { - DirectoryCopy.Do(electronhosthookDir, tempPath, true, new List() { "node_modules" }); + string hosthookDir = Path.Combine(tempPath, "ElectronHostHook"); + DirectoryCopy.Do(electronhosthookDir, hosthookDir, true, new List() { "node_modules" }); + + Console.WriteLine("Start npm install for hosthooks..."); + ProcessHelper.CmdExecute("npm install", hosthookDir); } DeployEmbeddedElectronFiles.Do(tempPath); diff --git a/ElectronNET.CLI/Commands/StartElectronCommand.cs b/ElectronNET.CLI/Commands/StartElectronCommand.cs index 8b31c3b..1a352bc 100644 --- a/ElectronNET.CLI/Commands/StartElectronCommand.cs +++ b/ElectronNET.CLI/Commands/StartElectronCommand.cs @@ -63,7 +63,11 @@ namespace ElectronNET.CLI.Commands if (Directory.Exists(electronhosthookDir)) { - DirectoryCopy.Do(electronhosthookDir, tempPath, true, new List() { "node_modules" }); + string hosthookDir = Path.Combine(tempPath, "ElectronHostHook"); + DirectoryCopy.Do(electronhosthookDir, hosthookDir, true, new List() { "node_modules" }); + + Console.WriteLine("Start npm install for hosthooks..."); + ProcessHelper.CmdExecute("npm install", hosthookDir); } DeployEmbeddedElectronFiles.Do(tempPath);