1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-07 20:17:05 +00:00

nothing serious here yet, just having fun with powershell and my nerves - but it works

Former-commit-id: ec83062ab7a588e9bfc6c42ce59834abf24723fa
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-06-24 04:49:24 +03:00
parent edbb128c68
commit c512222b9b
6 changed files with 153 additions and 47 deletions

View File

@@ -2,8 +2,12 @@
package main
import "errors"
var errUnableToInstall = errors.New("unable to install")
func powershell(script string, args ...string) error {
return (&platform{"powershell"}).attach(append([]string{script}, args...)...)
return (&platform{"powershell"}).attach("debug", append([]string{script}, args...)...)
}
func installDotnet(b bundle) error {
@@ -20,9 +24,15 @@ func installDotnet(b bundle) error {
// Unblock-File + script
// Solution (requires manual action):
// Right click on the ./scripts/dotnet-install.ps1 and check the "unblock" property, save and exit the dialog.
//
// -ExecutionPolicy Bypass? (not tested)
return powershell("./scripts/dotnet-install.ps1", b.parseArguments()...)
}
func installNode(b bundle) error {
return powershell("./scripts/node-install.ps1", b.parseArguments()...)
}
func installGit(b bundle) error {
return powershell("./scripts/git-install.ps1", b.parseArguments()...)
}