Skip to content

Commit 59fc1d5

Browse files
committed
Log existence of old folder when using new folder.
1 parent 1d78fc4 commit 59fc1d5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ducktools/env/platform_paths.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import os
2828
import os.path
2929

30+
from ._logger import log
3031

3132
class UnsupportedPlatformError(Exception):
3233
pass
@@ -152,6 +153,13 @@ def __init__(self, project_name="ducktools"):
152153

153154
self.project_folder = get_platform_folder(folder_base)
154155

156+
if sys.platform != "win32":
157+
if os.path.exists(os.path.join(USER_FOLDER, f".{folder_base}")):
158+
log(
159+
"Old ducktools-env folder detected, "
160+
"use the migrate subcommand to copy data to the new path."
161+
)
162+
155163
self.config_path = os.path.join(
156164
get_platform_folder(folder_base, config=True),
157165
CONFIG_FILENAME

0 commit comments

Comments
 (0)