You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you installed ripgrep with snap and are getting strange file permission or
file not found errors, then please do not file a bug. Instead, use one of the
Github binary releases.
Thanks for the excellent reproduction. This patch fixes the issue for you:
$ git diff
diff --git a/test/rg.js b/test/rg.js
index b799063..5a7f1e1 100644
--- a/test/rg.js
+++ b/test/rg.js
@@ -46,6 +46,7 @@
//`--threads 1`, // DOES NOT HELP
//`--with-filename`, // DOES NOT HELP
`-e '${pattern}'`,
+ `./`,
].join(' ');
var execOpts = {
cwd,
Basically, the problem here is likely because Node is attaching something to ripgrep's stdin even though there's nothing there. Since you didn't tell ripgrep to search anything, it has to "auto detect" whether to search the CWD or stdin. Since there's something on stdin, that's what it chooses. But since Node attaches something to stdin that has no data and is never closed, ripgrep never stops searching it. So this is really a Node problem.
The reason why ripgrep's behavior changed here was because it's a result of fixing another bug: 020c545
In any case, many people have reported this exact same bug. The issue with the biggest discussion on this problem is #1892.
What version of ripgrep are you using?
13.0.0
We are using 12.1.1 since 13.0.0 doesn't work
How did you install ripgrep?
RQDVER=13.0.0
curl -LO https://github.com/BurntSushi/ripgrep/releases/download/${RQDVER}/ripgrep_${RQDVER}_amd64.deb
sudo dpkg -i ripgrep_${RQDVER}_amd64.deb
If you installed ripgrep with snap and are getting strange file permission or
file not found errors, then please do not file a bug. Instead, use one of the
Github binary releases.
What operating system are you using ripgrep on?
Chromebook Pixel Linux [sudo lsb_release -a]
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Describe your bug.
Invoking following command from NodeJS 16 or 18 works fine on rg12.1.1 but times out on rg13.0.0
From shell command prompt, both rg12 and rg13 work as expected.
Invoking following command does work from any NodeJS, however:
What are the steps to reproduce the behavior?
See https://github.com/sc-voice/rg-bug
What is the actual behavior?
The test times out after 5 seconds. Increasing the timeout does not affect outcome. Here is the stdout and stderr from exec():
What is the expected behavior?
What do you think ripgrep should have done?
ripgrep 13 should work just like ripgrep 12 and return a result quickly.
"Aye, the haggis is in the fire for sure." (TOS: "A Taste of Armageddon")
The text was updated successfully, but these errors were encountered: