Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix #12638] Fix an Errno::ENOENT error when using server mode #12640

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/fix_an_error_when_using_sever_mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#12638](https://github.com/rubocop/rubocop/issues/12638): Fix an `Errno::ENOENT` error when using server mode. ([@koic][])
1 change: 0 additions & 1 deletion lib/rubocop/server/client_command/exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module ClientCommand
class Exec < Base
def run
ensure_server!
Cache.status_path.delete if Cache.status_path.file?
read_stdin = ARGV.include?('-s') || ARGV.include?('--stdin')
send_request(
command: 'exec',
Expand Down
1 change: 0 additions & 1 deletion lib/rubocop/server/server_command/exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ module ServerCommand
# @api private
class Exec < Base
def run
Cache.status_path.delete if Cache.status_path.file?
# RuboCop output is colorized by default where there is a TTY.
# We must pass the --color option to preserve this behavior.
@args.unshift('--color') unless %w[--color --no-color].any? { |f| @args.include?(f) }
Expand Down