Skip to content

Commit 40990c0

Browse files
hyangahuniquefine
andcommitted
extension: resolve variables in customFormatter field.
Fixes #2582 Originally PR #2942. Co-authored-by: Sebastian Leisinger <[email protected]> Change-Id: If4e2802ba4ab02e85830cf71883e0cc9557540f5 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/576296 Commit-Queue: Hyang-Ah Hana Kim <[email protected]> kokoro-CI: kokoro <[email protected]> Reviewed-by: Robert Findley <[email protected]>
1 parent 78deb71 commit 40990c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extension/src/language/legacy/goFormat.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import vscode = require('vscode');
1212
import { getGoConfig } from '../../config';
1313
import { toolExecutionEnvironment } from '../../goEnv';
1414
import { promptForMissingTool, promptForUpdatingTool } from '../../goInstallTools';
15-
import { getBinPath } from '../../util';
15+
import { getBinPath, resolvePath } from '../../util';
1616
import { killProcessTree } from '../../utils/processUtils';
1717

1818
export class GoDocumentFormattingEditProvider implements vscode.DocumentFormattingEditProvider {
@@ -144,7 +144,7 @@ export function getFormatTool(goConfig: { [key: string]: any }): string {
144144
return 'goimports';
145145
}
146146
if (formatTool === 'custom') {
147-
return goConfig['alternateTools']['customFormatter'] || 'goimports';
147+
return resolvePath(goConfig['alternateTools']['customFormatter'] || 'goimports');
148148
}
149149
return formatTool;
150150
}

0 commit comments

Comments
 (0)