Touch `conf.toml` by default when dne?
parent
4e7fd0879c
commit
944740799c
|
|
@ -261,7 +261,7 @@ def load(
|
||||||
MutableMapping,
|
MutableMapping,
|
||||||
] = tomllib.loads,
|
] = tomllib.loads,
|
||||||
|
|
||||||
touch_if_dne: bool = False,
|
touch_if_dne: bool = True,
|
||||||
|
|
||||||
**tomlkws,
|
**tomlkws,
|
||||||
|
|
||||||
|
|
@ -270,7 +270,7 @@ def load(
|
||||||
Load config file by name.
|
Load config file by name.
|
||||||
|
|
||||||
If desired config is not in the top level piker-user config path then
|
If desired config is not in the top level piker-user config path then
|
||||||
pass the ``path: Path`` explicitly.
|
pass the `path: Path` explicitly.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
# create the $HOME/.config/piker dir if dne
|
# create the $HOME/.config/piker dir if dne
|
||||||
|
|
@ -285,7 +285,8 @@ def load(
|
||||||
|
|
||||||
if (
|
if (
|
||||||
not path.is_file()
|
not path.is_file()
|
||||||
and touch_if_dne
|
and
|
||||||
|
touch_if_dne
|
||||||
):
|
):
|
||||||
# only do a template if no path provided,
|
# only do a template if no path provided,
|
||||||
# just touch an empty file with same name.
|
# just touch an empty file with same name.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue