diff options
author | Randshot <randshot@norealm.xyz> | 2020-07-14 21:43:12 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-07-15 09:41:16 +1000 |
commit | 5dfa26ea8b32c867bb583497bb729de47c4a1c1f (patch) | |
tree | 234d3ce04749391b9d4555e6482b6236bca78d14 /pkg/commands/git.go | |
parent | dbf042b8adc12b3cfb2d803c124e35b9fe93f317 (diff) |
use strconv for quoting in 'GitCommand.Commit' and 'OSCommand.ShellCommandFromString'
use raw strings for the escaped quotes in 'os_default_platform.go' and 'os_windows.go'
Signed-off-by: Randshot <randshot@norealm.xyz>
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 3599f7b39..0e4fa2aec 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -451,7 +451,7 @@ func (c *GitCommand) usingGpg() bool { // Commit commits to git func (c *GitCommand) Commit(message string, flags string) (*exec.Cmd, error) { - command := fmt.Sprintf("git commit %s -m %s", flags, c.OSCommand.Quote(message)) + command := fmt.Sprintf("git commit %s -m %s", flags, strconv.Quote(message)) if c.usingGpg() { return c.OSCommand.ShellCommandFromString(command), nil } |