From c6a137b589aafe4b6ce8d6174f43e1595fc79a23 Mon Sep 17 00:00:00 2001 From: Margret Riegert Date: Sun, 17 Nov 2024 05:54:11 -0500 Subject: [PATCH] Add log about using local ameba --- src/configuration.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/configuration.ts b/src/configuration.ts index f9a3b00..71a579f 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -3,6 +3,7 @@ import * as path from 'path'; import { existsSync } from 'fs'; import semver = require('semver'); import { execSync } from 'child_process'; +import { outputChannel } from './extension'; export interface AmebaConfig { command: string; @@ -16,7 +17,12 @@ export function getConfig(): AmebaConfig { const root = workspace.workspaceFolders || []; if (root.length) { const localAmebaPath = path.join(root[0].uri.fsPath, 'bin', 'ameba'); - if (existsSync(localAmebaPath)) command = localAmebaPath; + if (existsSync(localAmebaPath)) { + outputChannel.appendLine(`[Config] Using local ameba at ${localAmebaPath}`) + command = localAmebaPath; + } else { + outputChannel.appendLine(`[Config] Using system ameba`) + } } const workspaceConfig = workspace.getConfiguration('crystal-ameba');