summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2024-02-12 10:02:44 +0000
committerGitHub <noreply@github.com>2024-02-12 10:02:44 +0000
commit98a68b68a400f7b3821db1d77375a592b34cc8d6 (patch)
tree5ac3371d46fbd29e2dab8d66895f2c25db7014c0 /lib
parentcd69ca65273f0c8ef38c1bc47c3608758ba397ed (diff)
Fix git-submodule running in wrong location (#23059)
Diffstat (limited to 'lib')
-rw-r--r--lib/python/qmk/cli/git/submodule.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/python/qmk/cli/git/submodule.py b/lib/python/qmk/cli/git/submodule.py
index ef116ea124..1cbfd74e88 100644
--- a/lib/python/qmk/cli/git/submodule.py
+++ b/lib/python/qmk/cli/git/submodule.py
@@ -1,8 +1,8 @@
import shutil
+from pathlib import Path
from milc import cli
-from qmk.path import normpath
from qmk import submodules
REMOVE_DIRS = [
@@ -40,12 +40,12 @@ def git_submodule(cli):
remove_dirs = REMOVE_DIRS
if cli.config.git_submodule.force:
# Also trash everything that isnt marked as "safe"
- for path in normpath('lib').iterdir():
+ for path in Path('lib').iterdir():
if not any(ignore in path.as_posix() for ignore in IGNORE_DIRS):
remove_dirs.append(path)
- for folder in map(normpath, remove_dirs):
- if normpath(folder).is_dir():
+ for folder in map(Path, remove_dirs):
+ if folder.is_dir():
print(f"Removing '{folder}'")
shutil.rmtree(folder)