marwanhawari / stew

🥘 An independent package manager for compiled binaries.
MIT License
193 stars 14 forks source link

Using ~ (home dir) in config paths on Windows #30

Open riotrah opened 7 months ago

riotrah commented 7 months ago

I'm not sure how useful this would actually be, but in general my instinct when setting up new cli tools is to have them save their config in ~\.config, bins in ~\.local\bin etc even in Windows, especially given wider support for ~ these days.

I do this because I alternate between mac, windows and ubuntu (wsl) all the time, which don't have the same paths for the home dir, but try to standardize my cli setup between them via chezmoi (dotfiles manager). Further, on my work Mac, I cannot change my username, and it is different from my personal PC usernames.

I tried out this instinct by setting the stew paths to the above, but on windows, stew warns me that the bin path isn't available in my PATH, which I can confirm indeed is.

I can just dotfiles-track 2 stew config files, but I guess I would prefer one, especially if the stew configuration options expand more in the future.

marwanhawari commented 7 months ago

Hmm, unfortunately I don't have a Windows machine to develop on so I won't be able to reproduce this issue for now. If you're comfortable opening a PR, I would be happy to review it!

You could start looking in this file: lib/config.go

riotrah commented 7 months ago

I don't know go but might be fun to take a look at!