Skip to content

Commit

Permalink
Fix warning message
Browse files Browse the repository at this point in the history
The env var DEBUG does not work to produce detailed output. It is SYNTAX_SUGGEST_DEBUG. It was changed as part of the dead_end to syntax_suggest migration for Ruby 3.2
  • Loading branch information
schneems committed May 3, 2023
1 parent 4a54767 commit b294b2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## HEAD (unreleased)

- Use `SYNTAX_SUGGEST_DEBUG` instead of `DEBUG` env var value in timeout warning message (https://github.com/ruby/syntax_suggest/pull/194)
- Reduce line output for increased clarity (https://github.com/ruby/syntax_suggest/pull/190)

## 1.0.4
Expand Down
2 changes: 1 addition & 1 deletion lib/syntax_suggest/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def self.call(source:, filename: DEFAULT_VALUE, terminal: DEFAULT_VALUE, record_
code_lines: search.code_lines
).call
rescue Timeout::Error => e
io.puts "Search timed out SYNTAX_SUGGEST_TIMEOUT=#{timeout}, run with DEBUG=1 for more info"
io.puts "Search timed out SYNTAX_SUGGEST_TIMEOUT=#{timeout}, run with SYNTAX_SUGGEST_DEBUG=1 for more info"
io.puts e.backtrace.first(3).join($/)
end

Expand Down

0 comments on commit b294b2e

Please sign in to comment.