From b4e110dacd2b5c0ece5573b1a2701f9be3c93770 Mon Sep 17 00:00:00 2001 From: ImportTaste <53661808+ImportTaste@users.noreply.github.com> Date: Tue, 20 Jul 2021 20:21:14 -0500 Subject: [PATCH] Update shell options in main.go --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 66a70e2..8c4484c 100644 --- a/main.go +++ b/main.go @@ -246,7 +246,10 @@ func shell(args ...string) error { var shellCmdLine string if app.Conf.Shell == "powershell" { shellProc, _ = exec.LookPath("powershell.exe") - shellCmdLine = fmt.Sprintf("-? -NoExit -Command %s", fs.RemoveUnc(launchScript)) + shellCmdLine = fmt.Sprintf(" -NoExit -ExecutionPolicy Unrestricted -Command %s", fs.RemoveUnc(launchScript)) + } else if app.Conf.Shell == "pwsh" { + shellProc, _ = exec.LookPath("pwsh.exe") + shellCmdLine = fmt.Sprintf(" -NoExit -ExecutionPolicy Unrestricted -Command %s", fs.RemoveUnc(launchScript)) } else { shellProc = os.Getenv("COMSPEC") shellCmdLine = fmt.Sprintf(` /k "%s"`, fs.RemoveUnc(launchScript))