pml-lang / pml-companion

Java source code of the 'PML Companion (PMLC)'
https://www.pml-lang.dev
GNU General Public License v2.0
22 stars 1 forks source link

Resources directory written for non-action commands like help #87

Closed coemgenuslcp closed 1 year ago

coemgenuslcp commented 2 years ago

In PML 3.0.0, with the resources directory being written to ~/.config/PML_Companion/, this happens even when you run non-action commands such as pml -version.

INFO: Creating shared data directory ?/.config/PML_Companion/3_0
PMLC 3.0.0 2022-08-19

I can maybe see why you might desire contextual information on the resources (including overrides) available for the help messages, but I can't imagine you would need the resources directory for getting the version. In scripting, version checking is often a smoke test for checking a command-line tool is runnable, so the result here is that the check is not read-only.

pml-lang commented 2 years ago

In the current version the existence of the config directory is checked at each PMLC startup. It if doesn't exist it is created.

This should be changed, indeed.

The directory should only be created when it is actually needed by a PMLC command.

pml-lang commented 1 year ago

The directory should only be created when it is actually needed by a PMLC command.

Fixed in version 4.0.0