Skip to content

Commit c307190

Browse files
authored
Merge pull request #101 from aliceinwire/configuration
config: Fix example configuration path
2 parents 371d6c5 + 3d4ecee commit c307190

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

kcidev/subcommands/config.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ def add_config(fpath):
4949
poetry_example_configuration = os.path.join(
5050
os.path.dirname(__file__), "../..", example_configuration
5151
)
52-
if os.path.exists(poetry_example_configuration):
52+
poetry_example_configuration = os.path.normpath(poetry_example_configuration)
53+
if os.path.isfile(poetry_example_configuration):
54+
kci_msg("here1")
5355
config = True
5456
if not os.path.exists(dpath) and dpath != "":
5557
# copy config
@@ -60,12 +62,14 @@ def add_config(fpath):
6062
pypi_example_configuration = os.path.join(
6163
os.path.dirname(__file__), "..", example_configuration
6264
)
63-
if os.path.exists(pypi_example_configuration):
65+
pypi_example_configuration = os.path.normpath(pypi_example_configuration)
66+
if os.path.isfile(pypi_example_configuration):
67+
kci_msg("here2")
6468
config = True
6569
if not os.path.exists(dpath) and dpath != "":
6670
# copy config
6771
os.makedirs(dpath)
68-
shutil.copyfile(poetry_example_configuration, fpath)
72+
shutil.copyfile(pypi_example_configuration, fpath)
6973

7074
if not config:
7175
kci_err(f"No template configfile found at:")

0 commit comments

Comments
 (0)