Skip to content

Commit

Permalink
Merge pull request #194 from ruby/schneems/fix-warning-with-correct-e…
Browse files Browse the repository at this point in the history
…nv-var

Fix warning message
  • Loading branch information
schneems authored May 3, 2023
2 parents 2ff1f08 + c41da7a commit 6fda3f6
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 6fda3f6

Please sign in to comment.