siac should use api key from "--sia-directory"
BUG REPORT
Stack Trace or error message
Could not lock wallet: API authentication failed.
Expected Behavior
When "--sia-directory foobar" flag is used siac should read the API key from foobar/apipassword
Observed Behavior
siac looks for apipassword in $HOME/.sia regardless of --sia-directory
How to reproduce it (as minimally and precisely as possible)
- Have
siad
run from a separate user with homedir/home/siad
- siad puts its apipassword in
/home/siad/.sia/apipassword
- Run
siac wallet unlock
from a different user (root in my case) - siac is looking for API pass in
/root/.sia/apipassword
where is none - Run
siac --sia-directory /home/siad/.sia/ wallet unlock
as root - siac still looking in
/root/.sia/apipassword
and ignores/home/siad/.sia/apipassword
Environment
- Sia version: Version 1.3.7
- OS: Fedora 28