Touch `conf.toml` by default when dne?
parent
4e7fd0879c
commit
944740799c
|
|
@ -261,7 +261,7 @@ def load(
|
|||
MutableMapping,
|
||||
] = tomllib.loads,
|
||||
|
||||
touch_if_dne: bool = False,
|
||||
touch_if_dne: bool = True,
|
||||
|
||||
**tomlkws,
|
||||
|
||||
|
|
@ -270,7 +270,7 @@ def load(
|
|||
Load config file by name.
|
||||
|
||||
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
|
||||
|
|
@ -285,7 +285,8 @@ def load(
|
|||
|
||||
if (
|
||||
not path.is_file()
|
||||
and touch_if_dne
|
||||
and
|
||||
touch_if_dne
|
||||
):
|
||||
# only do a template if no path provided,
|
||||
# just touch an empty file with same name.
|
||||
|
|
|
|||
Loading…
Reference in New Issue