cybozu-go / aptutil

Go utilities for Debian APT repositories
MIT License
124 stars 29 forks source link

Support to expand environment variable in toml #36

Closed kenhys closed 6 years ago

kenhys commented 6 years ago

Before: meta_dir = "/home/user/.../go-apt-cacher/meta" cache_dir = "/home/user/.../go-apt-cacher/cache"

After: meta_dir = "${HOME}/.../go-apt-cacher/meta" cache_dir = "${HOME}/.../go-apt-cacher/cache"

In TOML spec, environment variable is not defined yet and it won't be added[1], but it is useful that environment variable is support in go-apt-cacher layer.

[1] https://github.com/toml-lang/toml/issues/255

ymmt2005 commented 6 years ago

I'm not sure that evaluating environment variables in TOML is appropriate for go-apt-cacher because it normally runs as a system service. I do not know other system software that expand environment variables.

@nishitaniyuki Any ideas?

nishitaniyuki commented 6 years ago

I'm also not sure evaluating environment variables in config is appropriate for system software.

kenhys commented 6 years ago

It seems that this PR is not in a good shape as a system software, so I will close it.

Thank you for comments!

ymmt2005 commented 6 years ago

@kenhys We appreciate your contributions. Hope this software helps.