Skip to content

Commit

Permalink
Merge pull request #101 from aliceinwire/configuration
Browse files Browse the repository at this point in the history
config: Fix example configuration path
  • Loading branch information
aliceinwire authored Jan 21, 2025
2 parents 371d6c5 + 3d4ecee commit c307190
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions kcidev/subcommands/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def add_config(fpath):
poetry_example_configuration = os.path.join(
os.path.dirname(__file__), "../..", example_configuration
)
if os.path.exists(poetry_example_configuration):
poetry_example_configuration = os.path.normpath(poetry_example_configuration)
if os.path.isfile(poetry_example_configuration):
kci_msg("here1")
config = True
if not os.path.exists(dpath) and dpath != "":
# copy config
Expand All @@ -60,12 +62,14 @@ def add_config(fpath):
pypi_example_configuration = os.path.join(
os.path.dirname(__file__), "..", example_configuration
)
if os.path.exists(pypi_example_configuration):
pypi_example_configuration = os.path.normpath(pypi_example_configuration)
if os.path.isfile(pypi_example_configuration):
kci_msg("here2")
config = True
if not os.path.exists(dpath) and dpath != "":
# copy config
os.makedirs(dpath)
shutil.copyfile(poetry_example_configuration, fpath)
shutil.copyfile(pypi_example_configuration, fpath)

if not config:
kci_err(f"No template configfile found at:")
Expand Down

0 comments on commit c307190

Please sign in to comment.