Skip to content
This repository was archived by the owner on Jan 16, 2021. It is now read-only.

Commit 04ef24b

Browse files
committed
Merge pull request #55 from swhitley/master
Command line quotes for Windows
2 parents 0016473 + 0b1a439 commit 04ef24b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

new.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"os"
66
"path/filepath"
77
"strings"
8+
"strconv"
89

910
"github.com/ParsePlatform/parse-cli/herokucmd"
1011
"github.com/ParsePlatform/parse-cli/parsecli"
@@ -35,12 +36,12 @@ func (n *newCmd) curlCommand(e *parsecli.Env, app *parsecli.App) string {
3536
-H "X-Parse-Application-Id: %s" \
3637
-H "X-Parse-REST-API-Key: %s" \
3738
-H "Content-Type: application/json" \
38-
-d '%s' \
39+
-d %s \
3940
https://api.parse.com/1/functions/hello
4041
`,
4142
app.ApplicationID,
4243
app.RestKey,
43-
args,
44+
strconv.Quote(args),
4445
)
4546
}
4647

new_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func TestCurlCommand(t *testing.T) {
147147
-H "X-Parse-Application-Id: AppID" \
148148
-H "X-Parse-REST-API-Key: RestKey" \
149149
-H "Content-Type: application/json" \
150-
-d '{}' \
150+
-d "{}" \
151151
https://api.parse.com/1/functions/hello
152152
`)
153153
}

0 commit comments

Comments
 (0)