From 151b1e2bb09562385f0bef0fd55c576127929c85 Mon Sep 17 00:00:00 2001 From: rugk Date: Fri, 9 Jul 2021 21:41:00 +0200 Subject: [PATCH] Remove absolute path check Fixes https://github.com/matthewpi/vscode-caddyfile-support/issues/56 **Untested**, and as far as I see the `spawn` thing likely makes it impossible to use, i.e. it does not work as I want, does it? So just consider this as a first try/starter for you. (I have no experience in VS Code development.) --- src/formatter.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/formatter.ts b/src/formatter.ts index 66ac571..5154244 100644 --- a/src/formatter.ts +++ b/src/formatter.ts @@ -26,11 +26,6 @@ export class CaddyfileDocumentFormattingEditProvider implements vscode.DocumentF return new Promise((resolve, reject) => { let executable: string; if (executablePath !== undefined && executablePath !== null && executablePath !== "") { - if (!path.isAbsolute(executablePath)) { - vscode.window.showInformationMessage("Invalid executable path for caddy."); - return reject(); - } - executable = executablePath; } else { executable = "caddy";