From 36bd678517721e2181d6ad1db549c92d28a35ee0 Mon Sep 17 00:00:00 2001 From: Ted Date: Mon, 3 Dec 2018 21:28:54 +0900 Subject: [PATCH 1/2] Respect ruby.pathToBundler for RuboCop executable --- src/format/RuboCop.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/format/RuboCop.ts b/src/format/RuboCop.ts index 7a48f16c6..06870b6a8 100644 --- a/src/format/RuboCop.ts +++ b/src/format/RuboCop.ts @@ -42,7 +42,8 @@ export class AutoCorrect { const ext: string = process.platform === 'win32' ? '.bat' : ''; if (vscode.workspace.getConfiguration('ruby').useBundler) { - return [`bundle${ext}`, 'exec', 'rubocop']; + let pathToBundler = vscode.workspace.getConfiguration('ruby').pathToBundler || 'bundle'; + return [`${pathToBundler}${ext}`, 'exec', 'rubocop']; } return [`rubocop${ext}`]; From 4e72ab2d37bdf3a8b147471d2b38ae9343d26ceb Mon Sep 17 00:00:00 2001 From: Ted Date: Thu, 6 Dec 2018 11:01:12 +0900 Subject: [PATCH 2/2] fixup! Respect ruby.pathToBundler for RuboCop executable --- src/format/RuboCop.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/format/RuboCop.ts b/src/format/RuboCop.ts index 06870b6a8..b16a36906 100644 --- a/src/format/RuboCop.ts +++ b/src/format/RuboCop.ts @@ -42,7 +42,8 @@ export class AutoCorrect { const ext: string = process.platform === 'win32' ? '.bat' : ''; if (vscode.workspace.getConfiguration('ruby').useBundler) { - let pathToBundler = vscode.workspace.getConfiguration('ruby').pathToBundler || 'bundle'; + const pathToBundler: string = + vscode.workspace.getConfiguration('ruby').pathToBundler || 'bundle'; return [`${pathToBundler}${ext}`, 'exec', 'rubocop']; }