summaryrefslogtreecommitdiffstats
path: root/pkg/commands/os.go
diff options
context:
space:
mode:
authorAndrei Miulescu <lusu777@gmail.com>2018-08-14 12:24:32 +1000
committerAndrei Miulescu <lusu777@gmail.com>2018-08-14 12:24:32 +1000
commit842ceec9b0eb46de48cb875aaa00dadd19efb008 (patch)
tree7dee698ac5ab7a0621cb83fd9cfcfffcc54d05a1 /pkg/commands/os.go
parentc0a1f906043132c08c7f43b7e8201c571393082f (diff)
Platform should only be present once
Diffstat (limited to 'pkg/commands/os.go')
-rw-r--r--pkg/commands/os.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/commands/os.go b/pkg/commands/os.go
index 14a3721ad..f29141669 100644
--- a/pkg/commands/os.go
+++ b/pkg/commands/os.go
@@ -19,7 +19,7 @@ var (
)
// Platform stores the os state
-type platform struct {
+type Platform struct {
os string
shell string
shellArg string
@@ -29,7 +29,7 @@ type platform struct {
// OSCommand holds all the os commands
type OSCommand struct {
Log *logrus.Logger
- Platform platform
+ Platform *Platform
}
// NewOSCommand os command runner
@@ -67,17 +67,17 @@ func sanitisedCommandOutput(output []byte, err error) (string, error) {
return outputString, err
}
-func getPlatform() platform {
+func getPlatform() *Platform {
switch runtime.GOOS {
case "windows":
- return platform{
+ return &Platform{
os: "windows",
shell: "cmd",
shellArg: "/c",
escapedQuote: "\\\"",
}
default:
- return platform{
+ return &Platform{
os: runtime.GOOS,
shell: "bash",
shellArg: "-c",