diff --git a/ElectronNET.CLI/Commands/InitCommand.cs b/ElectronNET.CLI/Commands/InitCommand.cs index b78bef6..0d17e1e 100644 --- a/ElectronNET.CLI/Commands/InitCommand.cs +++ b/ElectronNET.CLI/Commands/InitCommand.cs @@ -91,6 +91,13 @@ namespace ElectronNET.CLI.Commands // this is should solve the problem for 80% of the users // for the other 20% we might fail... var launchSettingFile = Path.Combine(currentDirectory, "Properties", "launchSettings.json"); + + if (File.Exists(launchSettingFile) == false) + { + Console.WriteLine("launchSettings.json not found - do nothing."); + return; + } + string launchSettingText = File.ReadAllText(launchSettingFile); if (launchSettingText.Contains("electronize start") == false)