mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix leave open option for cmd plugin
Add "Wait for a key press before closing" option. See #141 for more info.
This commit is contained in:
parent
3beebd42a8
commit
e40c1ff09e
1 changed files with 5 additions and 1 deletions
|
|
@ -143,8 +143,12 @@ namespace Wox.Plugin.CMD
|
||||||
|
|
||||||
private void ExecuteCmd(string cmd, bool runAsAdministrator = false)
|
private void ExecuteCmd(string cmd, bool runAsAdministrator = false)
|
||||||
{
|
{
|
||||||
if (context.API.ShellRun(cmd, runAsAdministrator))
|
var fullCmd = CMDStorage.Instance.LeaveCmdOpen ? $"cmd /k \"{cmd}\" & pause & exit" : cmd;
|
||||||
|
var success = context.API.ShellRun(fullCmd, runAsAdministrator);
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
CMDStorage.Instance.AddCmdHistory(cmd);
|
CMDStorage.Instance.AddCmdHistory(cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init(PluginInitContext context)
|
public void Init(PluginInitContext context)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue