From 52225100c8cf8c61a0f50d981100cf8528063b49 Mon Sep 17 00:00:00 2001 From: Justin Eveland Date: Fri, 10 Feb 2023 19:49:17 -0500 Subject: [PATCH] fix: strip quotes from stringified content --- fixes/file-modify.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fixes/file-modify.js b/fixes/file-modify.js index 5309a803..c41e67e3 100644 --- a/fixes/file-modify.js +++ b/fixes/file-modify.js @@ -116,10 +116,11 @@ async function fileModify(fs, options, targets, dryRun = false) { // return the target information const message = typeof options.text === 'object' - ? `${options.write_mode} text from ${ - options.text.file || options.text.url - } to file` - : `${options.write_mode} \`${JSON.stringify(content).slice( + ? `${options.write_mode} text from ${options.text.file || options.text.url + } to file` + : `${options.write_mode} \`${JSON.stringify(content) + .replace(/\\"/g, '"') + .slice( 1, -1 )}\` to file`