Page 1 of 1

[0.15.25] Missing Path Expansion for HOME in .cfg and .ini

Posted: Fri Jun 30, 2017 7:43 am
by webhostbudd
It would be nice to have a special token representing $HOME like __PATH__home similar to how $0 is represented as __PATH__executable in config files. Maybe the more generic solution would be to allow any kind of environment variable substitution through __ENV__<var> instead of hardcoding for a usecase like HOME.

Right now I'm using sed hacks and binary wrapping to work around this shortcoming, but it would be nice to do this natively to prevent parsing incompatibilities in the future.

Re: [0.15.25] Missing Path Expansion for HOME in .cfg and .ini

Posted: Fri Jun 30, 2017 8:19 am
by posila
__PATH__system-write-data__ expands to ~/.factorio on Linux, %APPDATA%\Factorio on Windows and ~/Library/Application Support/factorio on MacOSX

Can you elaborate on what would you need environment variable expansion for and why modifying config instead of environment variable is not good enough option?