diff options
author | Randshot <randshot@norealm.xyz> | 2020-05-30 23:00:01 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-07-12 14:06:53 +1000 |
commit | 19a808642f1dee0ee9a19731023f48eff86a1985 (patch) | |
tree | 9c08a0e1524f37ff42d543eaefaaa5237a21f7e3 | |
parent | e921ba0910c2431c26ffcbdf3847734e1283dded (diff) |
fix platform specific quoting when using GPG
fixes #620
Signed-off-by: Randshot <randshot@norealm.xyz>
-rw-r--r-- | pkg/commands/git.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index e6a655782..8fa2c78bd 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -448,7 +448,7 @@ func (c *GitCommand) usingGpg() bool { func (c *GitCommand) Commit(message string, flags string) (*exec.Cmd, error) { command := fmt.Sprintf("git commit %s -m %s", flags, c.OSCommand.Quote(message)) if c.usingGpg() { - return c.OSCommand.PrepareSubProcess(c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, command), nil + return c.OSCommand.ExecutableFromString(fmt.Sprintf("%s %s %s", c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, command)), nil } return nil, c.OSCommand.RunCommand(command) @@ -465,7 +465,7 @@ func (c *GitCommand) GetHeadCommitMessage() (string, error) { func (c *GitCommand) AmendHead() (*exec.Cmd, error) { command := "git commit --amend --no-edit --allow-empty" if c.usingGpg() { - return c.OSCommand.PrepareSubProcess(c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, command), nil + return c.OSCommand.ExecutableFromString(fmt.Sprintf("%s %s %s", c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, command)), nil } return nil, c.OSCommand.RunCommand(command) |