Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
bitcoin-cli is hanging indefinitely when called with stop in an empty datadir.
Expected behaviour
I would prefer it to exit with error like it does when the datadir directory is non-existent.
$ rmdir empty
$ bitcoin-cli -datadir=empty stop
Error: Specified data directory "empty" does not exist.
Steps to reproduce
Simple shell example:
$ mkdir empty
$ bitcoin-cli -datadir=empty stop
^C
$ time -p timeout 21 bitcoin-cli -datadir=empty help
real 21.00
user 0.00
sys 0.01
Relevant log output
No response
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
Bitcoin Core version v27.99.0-06c2c713c52b (testnet4 PR build)
Operating system and version
Pop!_OS 22.04 LTS
Machine specifications
Linux x86_64, glibc