Closed timotheecour closed 7 years ago
Tools which are downloaded and unpacked (as opposed to installed) generally operate in the current directory. This workflow is common for Windows tools.
Note that you can set workDir
in the configuration file to any path you want.
digger build
still builds in $PWD
grep workDir ~/.config/digger.ini
workDir=~/.config/digger/
also tried to put it in dir where digger binary is, but doesn't work.
These should as per instructions in: https://github.com/CyberShadow/Digger/blob/master/digger.ini.sample#L16
# Additionally, for compatibility with previous versions,
# the following locations are searched:
# - ~/.digger/digger.ini
$XDG_CONFIG_HOME/digger (default ~/.config) (i don't have XDG_CONFIG_HOME set so i'd assume it'd use ~/.config)
[i'm on OSX]
If that's true, it indicates a bug...
I can't reproduce this.
I pushed a commit that adds printing the configuration file and work directory paths to the help screen. See what results you get with it.
i can't rebuild after the commit you pushed, see https://github.com/CyberShadow/Digger/issues/45
Also, I confirmed on another OS (ubuntu) that the above problem is there:
grep workDir ~/.config/digger.ini
workDir=~/.config/digger/
is ignored.
am i supposed to explicitly pass in the path to ~/.config/digger.ini in digger build
?
You mean to say that you initially tested on a different version than latest git? No wonder.
uname Darwin
git rev-parse HEAD 64df671aa5ecd2a552d25a2503c1602b97f3504e (should include "I pushed a commit that adds printing the configuration file ")
rdmd --build-only -debug digger
pwd /Users/timothee/temp/d02
/Users/timothee/git_clone/D/Digger/digger Configuration file: (not present) Working directory: /Users/timothee/temp/d02
grep workDir ~/.config/digger.ini workDir=~/.config/digger/
am i missing something?
that's what i did, see above (/Users/timothee/git_clone/D/Digger/digger)
/Users/timothee/git_clone/D/Digger/digger Configuration file: (not present) Working directory: /Users/timothee/temp/d02
/Users/timothee/git_clone/D/Digger/digger --config-file=$HOME/.config/digger.ini Configuration file: /Users/timothee/.config/digger.ini Working directory: /Users/timothee/.config/digger
No idea why it's not finding the configuration file for you.
Try adding some debug writeln's here, to make it print the full locations it checks: https://github.com/CyberShadow/Digger/blob/master/config.d#L65
there were 2 cases:
~/.config/digger/digger.ini
, not ~/.config/digger.ini
, sorry for the noise.Oh, I see. I had missed that as well. Glad to know it's resolved.
maybe this would be just a bit clearer in digger.ini.sample:
$XDG_CONFIG_HOME/digger (default ~/.config)
to:
$XDG_CONFIG_HOME/digger (XDG_CONFIG_HOME defaults to ~/.config)
likewise with
$XDG_CONFIG_DIRS/digger (default /etc/xdg)
related to case 1: above: https://issues.dlang.org/show_bug.cgi?id=16595
maybe this would be just a bit clearer in digger.ini.sample:
e08d3fc11d26185dbeb59f13aa840b0e1dace3ac
this is the usual behavior of other tools (eg dub, which builds in ~/.dub/ etc) or any other name... otherwise it's easy to end up with many installations in different directories wherever they were run...
at least an option for that?