diff options
author | Tyler Davis <tydavis@gmail.com> | 2020-04-25 03:32:59 +0000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-04-27 19:14:18 +1000 |
commit | b5404c61598a0ccfa8c1fba058f42b4547cbcf5d (patch) | |
tree | 1abd7b92d5569d9d025d407b9beff7fc9d5d4b76 /pkg/commands/git.go | |
parent | 42d21c4bb68759172c809f2ac20f3f046b61df0f (diff) |
fix issue #640 add catCmd and OS-specific values
Add a catCmd to the Platform struct and set the value to "cat" for
non-windows builds and "type" for windows builds.
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r-- | pkg/commands/git.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index f996c01b5..31318fc92 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -479,7 +479,7 @@ func (c *GitCommand) Push(branchName string, force bool, upstream string, args s // CatFile obtains the content of a file func (c *GitCommand) CatFile(fileName string) (string, error) { - return c.OSCommand.RunCommandWithOutput("cat %s", c.OSCommand.Quote(fileName)) + return c.OSCommand.RunCommandWithOutput("%s %s", c.OSCommand.Platform.catCmd, c.OSCommand.Quote(fileName)) } // StageFile stages a file |