diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-14 18:10:44 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-14 18:10:44 +1000 |
commit | 5f30f07ea5042a0f80c25c4ffc760334ed015d03 (patch) | |
tree | ac3989ad55944f74a4c563951f9d93267ef9255b /pkg/commands/os.go | |
parent | c02f474bf341e647a92d5228d75cdd5f0c28d8c6 (diff) | |
parent | ad3d332e055dea2d53d977072fdeac75e3700db3 (diff) |
Merge branch 'master' into feature/quoted-messages
Diffstat (limited to 'pkg/commands/os.go')
-rw-r--r-- | pkg/commands/os.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/commands/os.go b/pkg/commands/os.go index 2edc0165e..d7fa6fc39 100644 --- a/pkg/commands/os.go +++ b/pkg/commands/os.go @@ -22,7 +22,7 @@ var ( ) // Platform stores the os state -type platform struct { +type Platform struct { os string shell string shellArg string @@ -32,7 +32,7 @@ type platform struct { // OSCommand holds all the os commands type OSCommand struct { Log *logrus.Logger - Platform platform + Platform *Platform } // NewOSCommand os command runner @@ -81,17 +81,17 @@ func sanitisedCommandOutput(output []byte, err error) (string, error) { return outputString, nil } -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", |