on master help sign in
3 files changed+9−5
since splitsnapshots
unifiedsplit
CHANGELOG.md+3 package.json+2−2 src/extension.ts+4−3
CHANGELOG.md+3
@@ -1,5 +1,8 @@
11# Change Log
22
3+### 0.0.12
4+
5+Fixed a bug where executable paths outside of `$PATH` would fail. (@lzszt)
36
47### 0.0.11
58
package.json+2−2
@@ -3,7 +3,7 @@
33 "displayName": "Ormolu",
44 "publisher": "ilyakooo0",
55 "description": "Haskell code formatter with ormolu",
6− "version": "0.0.11",
6+ "version": "0.0.12",
77 "repository": {
88 "type": "git",
99 "url": "https://github.com/ilyakooo0/vs-code-ormolu"
@@ -160,4 +160,4 @@
160160 "tslint": "^5.12.1",
161161 "vscode-test": "^1.2.0"
162162 }
163−}
163+}
src/extension.ts+4−3
@@ -15,17 +15,18 @@ export function activate(context: vscode.ExtensionContext) {
1515 return [];
1616 };
1717
18+ const cfg = vscode.workspace.getConfiguration("ormolu");
19+
1820 try {
19− proc.execSync('ormolu --help');
21+ proc.execSync(cfg.executablePath + ' --help');
2022 } catch (e) {
2123 return showErrorMessage("Ormolu is not installed", e);
2224 }
2325
24− const cfg = vscode.workspace.getConfiguration("ormolu");
25−
2626 let command = cfg.executablePath;
2727
2828 command += ` --start-line ${range.start.line + 1} --end-line ${range.end.line + (range.end.character == 0 ? 0 : 1)}`
29+ command += ` --stdin-input-file ${document.fileName}`
2930
3031 for (let [key, value] of Object.entries(cfg.extensions)) {
3132 if (value) {