mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
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.
This commit is contained in:
committed by
Jesse Duffield
parent
42d21c4bb6
commit
b5404c6159
@ -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
|
||||
|
Reference in New Issue
Block a user