summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git.go
diff options
context:
space:
mode:
authorRandshot <randshot@norealm.xyz>2020-07-14 21:43:12 +0200
committerJesse Duffield <jessedduffield@gmail.com>2020-07-15 09:41:16 +1000
commit5dfa26ea8b32c867bb583497bb729de47c4a1c1f (patch)
tree234d3ce04749391b9d4555e6482b6236bca78d14 /pkg/commands/git.go
parentdbf042b8adc12b3cfb2d803c124e35b9fe93f317 (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.go2
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
}