From af884d9710dd42c462437c02a53948b09d5d396f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 23 Jan 2025 12:22:42 -0800 Subject: follows --- lib/strfry.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/strfry.ts') diff --git a/lib/strfry.ts b/lib/strfry.ts index 926ca429..65b77709 100644 --- a/lib/strfry.ts +++ b/lib/strfry.ts @@ -72,7 +72,10 @@ const exec = async (cmd: string, data = ""): Promise => // return r; // }; -export const load = (data) => exec(`echo '${data}' | /app/strfry import --no-verify\n`); +export const load = (data) => + exec( + `echo '${data.replace(/'/g, "'\\''")}' | /app/strfry import --no-verify\n`, + ); export const count = (f) => exec(`/app/strfry scan --count '${JSON.stringify(f)}'\n`); export const scan = (f) => exec(`/app/strfry scan '${JSON.stringify(f)}'\n`); -- cgit v1.2.3