From efff316a0732f7c6dce1e05f446ad11145f5a1c4 Mon Sep 17 00:00:00 2001 From: Jose V Sebastian Date: Sat, 10 Feb 2024 10:30:21 +0530 Subject: [PATCH] fix: add quotation marks around jar file in GoogleJavaFormatterSync.ts fix regression fixes #4 --- src/GoogleJavaFormatterSync.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GoogleJavaFormatterSync.ts b/src/GoogleJavaFormatterSync.ts index c43325f..c942877 100644 --- a/src/GoogleJavaFormatterSync.ts +++ b/src/GoogleJavaFormatterSync.ts @@ -20,7 +20,7 @@ export default class GoogleJavaFormatterSync implements IGoogleJavaFormatter { public format(text: string, range?: [number, number]): Promise { return new Promise((resolve, reject) => { try { - let command = `java -jar ${this.config.jarUri.fsPath}`; + let command = `java -jar "${this.config.jarUri.fsPath}"`; if (this.config.extra) { command += ` ${this.config.extra}`;