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

Commit bf91476

Browse files
committed
Command line quotes for Windows
1 parent 57e0bd7 commit bf91476

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

new.go

Lines changed: 5 additions & 4 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"
@@ -25,17 +26,17 @@ type newCmd struct {
2526
}
2627

2728
func (n *newCmd) curlCommand(e *parsecli.Env, app *parsecli.App) string {
28-
args := "{}"
29+
args := "\"{}\""
2930
if e.Type == parsecli.HerokuFormat {
30-
args = `{"a": "Adventurous ", "b": "Parser"}`
31+
args = strconv.Quote(`{"a": "Adventurous ", "b": "Parser"}`)
3132
}
32-
33+
3334
return fmt.Sprintf(
3435
`curl -X POST \
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,

0 commit comments

Comments
 (0)