Even when it doesn't need to use the datadir:
$ HOME=/no/such/folder bitcoin-cli -rpcconnect=1.1.1.1 -rpcuser=a -rpcpassword=b
************************
EXCEPTION: N5boost10filesystem16filesystem_errorE
boost::filesystem::create_directories: Permission denied: "/no/such/folder"
bitcoin in AppInitRPC()
Is this intentional?