Skip to content
This repository has been archived by the owner on Sep 5, 2021. It is now read-only.

PowerShell revisions #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down