SublimeLinter / SublimeLinter-rubocop

SublimeLinter 3 plugin for Ruby, using rubocop.
MIT License
159 stars 40 forks source link

Wrong ruby executable taken, when using with rvm. #41

Closed RaimundHuebel closed 6 years ago

RaimundHuebel commented 7 years ago
General Infos
Problem & Fix:

When using SublimeLinter-rubocop the Linter always use 'ruby' to execute rubocop, whereas SublimeLinter-RubyLinter has detected rvm-auto-ruby as executable.

# The problematic line is (in linter.rb):
class RuboCop(RubyLinter):
    ...
    def cmd(self):
        ...
        #NOW: Here is ruby is hardcoded.
        command = ['ruby', '-S', 'rubocop', '--format', 'emacs']
        #BETTER:
        command = self.executable_path + ['-S', 'rubocop', '--format', 'emacs']

With kind regards, Raimund

ljkbennett commented 7 years ago

Hi @RaimundHuebel thanks for your contribution. I've just gotten involved with maintenance of this project and I need to take a deeper look so I can understand the possible issues this might cause, particularly in relation to https://github.com/SublimeLinter/SublimeLinter-rubocop/issues/26

I am on it and will get back to you asap. Thanks again.

mvastola commented 6 years ago

Is there any movement on this? Having this exact issue.

ljkbennett commented 6 years ago

Yes, I am just working on another PR for editing the command to be run and then there will be a new release with this in.

mvastola commented 6 years ago

Thanks!

arielkirkwood commented 6 years ago

@ljkbennett Need any help? Looking to set this up with a bundled copy of Rubocop instead of just the system default.

ckhall commented 6 years ago

please see https://github.com/SublimeLinter/SublimeLinter-rubocop/pull/47

douglas commented 6 years ago

Perhaps this helps as well.

braver commented 6 years ago

closed via #47