Skip to content
This repository was archived by the owner on Jul 28, 2020. It is now read-only.

Commit b31b1d9

Browse files
committed
Specify executionPolicy for windows deploy scripts
[#162358111]
1 parent e29d1f6 commit b31b1d9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

provision/cloudfoundry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func (c *Controller) DeployCloudFoundry(ui UI, dockerRegistries []string) error
1515
var cmd *exec.Cmd
1616

1717
if runtime.GOOS == "windows" {
18-
cmd = exec.Command("powershell.exe", filepath.Join(c.Config.ServicesDir, "deploy-cf.ps1"))
18+
cmd = exec.Command("powershell.exe", "-ExecutionPolicy", "Bypass", "-File", filepath.Join(c.Config.ServicesDir, "deploy-cf.ps1"))
1919
} else {
2020
cmd = exec.Command(filepath.Join(c.Config.ServicesDir, "deploy-cf"))
2121
}

provision/services.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func (c *Controller) DeployService(service Service) error {
1313
var cmd *exec.Cmd
1414

1515
if runtime.GOOS == "windows" {
16-
cmd = exec.Command("powershell.exe", filepath.Join(c.Config.ServicesDir, service.Script+".ps1"))
16+
cmd = exec.Command("powershell.exe", "-ExecutionPolicy", "Bypass", "-File", filepath.Join(c.Config.ServicesDir, service.Script+".ps1"))
1717
} else {
1818
cmd = exec.Command(filepath.Join(c.Config.ServicesDir, service.Script))
1919
}

0 commit comments

Comments
 (0)