osa1 / tiny

A terminal IRC client
MIT License
1.01k stars 61 forks source link

Implement tilde extension for log_dir config field #192

Open eoli3n opened 4 years ago

eoli3n commented 4 years ago
➜ LANG=C pacman -Qi tiny-irc-client-git
Name            : tiny-irc-client-git
Version         : 0.4.3-1
Description     : A console IRC client
Architecture    : x86_64
URL             : https://github.com/osa1/tiny
Licenses        : MIT
Groups          : None
Provides        : tiny
Depends On      : openssl  dbus
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 3.39 MiB
Packager        : Unknown Packager
Build Date      : Sat May 9 09:04:56 2020
Install Date    : Sat May 9 09:13:55 2020
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None

I changed default log dir in my config : https://github.com/eoli3n/dotfiles/blob/wayland/roles/tiny/templates/config.yml.j2#L38

Then when i start tiny i get "Can't create logger: No such file or directory (os error 2)"

osa1 commented 4 years ago

This is because we don't currently do tilde expansion, the string is used directly without any pre-processing. I'm not opposed to adding this.

eoli3n commented 4 years ago

I use my config on multiple hosts, so it would be great to be able to not have to set it statically. BTW, $HOME seems not working too.