From 43f86f446db48e70b02555fd3c853cbfc0a09f38 Mon Sep 17 00:00:00 2001 From: Arnav K Date: Sat, 16 Nov 2024 11:35:46 +0530 Subject: [PATCH] fix(env.ts): no need of double double quotes (#372) * fix(env.ts): no need of double double quotes * chore: changesets --------- Co-authored-by: Pkmmte Xeleon --- .changeset/strong-hats-rescue.md | 5 +++++ packages/create-robo/src/env.ts | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 .changeset/strong-hats-rescue.md diff --git a/.changeset/strong-hats-rescue.md b/.changeset/strong-hats-rescue.md new file mode 100644 index 00000000..4bd752f2 --- /dev/null +++ b/.changeset/strong-hats-rescue.md @@ -0,0 +1,5 @@ +--- +'create-robo': patch +--- + +fix: no need of double double quotes diff --git a/packages/create-robo/src/env.ts b/packages/create-robo/src/env.ts index 1714f431..2f979c73 100644 --- a/packages/create-robo/src/env.ts +++ b/packages/create-robo/src/env.ts @@ -135,14 +135,7 @@ export class Env { private escapeValue(value: string): string { // Escape backslashes and double quotes - const escaped = value.replace(/\\/g, '\\\\').replace(/"/g, '\\"') - - // Determine if the value needs to be quoted - if (/[\s#=]/.test(value)) { - return `"${escaped}"` - } else { - return escaped - } + return value.replace(/\\/g, '\\\\').replace(/"/g, '\\"') } /**