Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit 363109f

Browse files
committed
Rename execPath to executablePath
Rename the `execPath` setting to `executablePath` to match the other providers.
1 parent caf2cee commit 363109f

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

lib/main.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,21 @@ const regex = /(.+):(\d+):(\d+):(?:{(\d+):(\d+)-(\d+):(\d+)}.*:)? ([\w \\-]+): (
1111
export default {
1212
activate() {
1313
require('atom-package-deps').install('linter-clang');
14+
15+
// FIXME: Remove backwards compatibility in a future minor version
16+
const oldPath = atom.config.get('linter-clang.execPath');
17+
if (oldPath !== undefined) {
18+
atom.config.unset('linter-clang.execPath');
19+
if (oldPath !== 'clang') {
20+
// If the old config wasn't set to the default migrate it over
21+
atom.config.set('linter-pylint.executablePath', oldPath);
22+
}
23+
}
24+
1425
this.subscriptions = new CompositeDisposable();
1526
this.subscriptions.add(
16-
atom.config.observe('linter-clang.execPath', (value) => {
17-
this.execPath = value;
27+
atom.config.observe('linter-clang.executablePath', (value) => {
28+
this.executablePath = value;
1829
}),
1930
);
2031
this.subscriptions.add(
@@ -150,7 +161,7 @@ export default {
150161
cwd: projectPath,
151162
};
152163

153-
const output = await helpers.exec(this.execPath, args, execOpts);
164+
const output = await helpers.exec(this.executablePath, args, execOpts);
154165

155166
if (editor.getText() !== fileText) {
156167
// Editor contents have changed, tell Linter not to update results

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"atom": ">=1.4.0 <2.0.0"
1313
},
1414
"configSchema": {
15-
"execPath": {
15+
"executablePath": {
1616
"type": "string",
1717
"default": "clang"
1818
},

0 commit comments

Comments
 (0)