Skip to content

Commit 752c1cc

Browse files
committed
fix: printing curl command in debug mode should use quoted data
1 parent b7cca91 commit 752c1cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const solrPost = config => path => async data => {
3333
})
3434

3535
if (config.debug) {
36-
const dataPart = isEmptyObject(data) ? "" : ` -d ${JSON.stringify(data)}`
36+
const dataPart = isEmptyObject(data) ? "" : ` -d '${JSON.stringify(data)}'`
3737
console.debug(
3838
`\n$ curl -X POST '${solrUrl}' -H 'Content-Type: application/json'${dataPart}\n`
3939
)

0 commit comments

Comments
 (0)