config gropple portable #13
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
why is
config.ymlnot saved in the same folder asgropple.exe?It's pretty standard behaviour to store a config file in $HOME or similar, so the binary can be anywhere. What's your use case?
how to save
config.ymlin a portable folder so it's easy to use gropple without config from scratch again.Do you mean you want to run it from a USB stick or similar? On multiple machines?
yes
yes

as this isn't answered (yet?), i suggest to edit 'config.go' lines 164 to 183 as followed:
original:
`func configPath() string {
dir, err := os.UserConfigDir()
if err != nil {
log.Fatalf("cannot find a directory to store config: %v", err)
}
appDir := "gropple"
}`
edited version:
`func configPath() string {
dir, err := os.Executable()
if err != nil {
log.Fatalf("cannot find a directory to store config: %v", err)
}
}`
ps: this is untested, and like a first Golang-edit for me, but that should do would you want.
pfff code-block insert is sh**t, oh well you should be able to figure it out with the above info