summaryrefslogtreecommitdiffstats
path: root/pkg/commands/os.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-08-14 11:15:29 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-08-14 11:16:52 +1000
commit95c7df4c61a31a0940eee4981beda78981c651eb (patch)
treec5a4d5602e3d4e5ebc2efc96c8c84c140532dbb2 /pkg/commands/os.go
parentc0a1f906043132c08c7f43b7e8201c571393082f (diff)
use platform-specific message quoting
Diffstat (limited to 'pkg/commands/os.go')
-rw-r--r--pkg/commands/os.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/commands/os.go b/pkg/commands/os.go
index 14a3721ad..393029d84 100644
--- a/pkg/commands/os.go
+++ b/pkg/commands/os.go
@@ -155,3 +155,8 @@ func (c *OSCommand) PrepareSubProcess(cmdName string, commandArgs ...string) (*e
subprocess := exec.Command(cmdName, commandArgs...)
return subprocess, nil
}
+
+// Quote wraps a message in platform-specific quotation marks
+func (c *OSCommand) Quote(message string) string {
+ return c.Platform.escapedQuote + message + c.Platform.escapedQuote
+}