From 5b4dcfb04e5210e52149b6ab447f2158edb9892b Mon Sep 17 00:00:00 2001 From: Lois Di Qual Date: Tue, 7 Oct 2025 10:25:38 -0700 Subject: [PATCH] Remove extra dollar sign in curl command export --- src/helpers/curlHelpers.test.ts | 8 ++++---- src/helpers/curlHelpers.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/helpers/curlHelpers.test.ts b/src/helpers/curlHelpers.test.ts index e5c2fd4..dd984a4 100644 --- a/src/helpers/curlHelpers.test.ts +++ b/src/helpers/curlHelpers.test.ts @@ -105,7 +105,7 @@ describe('getNetworkCurl', () => { "curl 'https://api.example.com/graphql' \\\n" + " -H 'content-type: application/json' \\\n" + ' -X POST \\\n' + - ' --data-raw $\'{"query":"query { test! }"}\'' + ' --data-raw \'{"query":"query { test! }"}\'' ) }) @@ -162,7 +162,7 @@ describe('getNetworkCurl', () => { " -H 'Content-Type: application/json' \\\n" + " -H 'Authorization: Bearer token123' \\\n" + ' -X POST \\\n' + - ' --data-raw $\'{"query":"query TestQuery { test }","variables":{}}\'' + ' --data-raw \'{"query":"query TestQuery { test }","variables":{}}\'' ) }) @@ -215,7 +215,7 @@ describe('getNetworkCurl', () => { " -H 'content-type: application/json' \\\n" + " -H 'authorization: Bearer token123' \\\n" + ' -X POST \\\n' + - ' --data-raw $\'{"query":"query { user { id name } }","variables":{"userId":"123"}}\'' + ' --data-raw \'{"query":"query { user { id name } }","variables":{"userId":"123"}}\'' ) }) @@ -302,7 +302,7 @@ describe('getNetworkCurl', () => { " -H 'content-type: application/json' \\\n" + " -H 'authorization: Bearer token123' \\\n" + ' -X POST \\\n' + - ' --data-raw $\'{"query":"query { test }","variables":{}}\'' + ' --data-raw \'{"query":"query { test }","variables":{}}\'' ) }) }) diff --git a/src/helpers/curlHelpers.ts b/src/helpers/curlHelpers.ts index 1638ad2..5d0621f 100644 --- a/src/helpers/curlHelpers.ts +++ b/src/helpers/curlHelpers.ts @@ -92,7 +92,7 @@ export const getNetworkCurl = async ( // Add body with proper escaping if (chromeRequest.request.postData?.text) { const formattedBody = formatBody(chromeRequest.request.postData.text) - parts.push(`--data-raw $'${formattedBody}'`) + parts.push(`--data-raw '${formattedBody}'`) } return parts.join(' \\\n ')