fix: incorrect type comparaison lead to infinite loop when not in ck project

This commit is contained in:
Jordan ⌨️ 2023-11-11 11:43:42 +01:00
parent 920762f56d
commit d842c6af2d
2 changed files with 3 additions and 1 deletions

View file

@ -5,6 +5,7 @@ import logging
from cutekit import const, project, vt100, plugins, cmds
from cutekit.args import parse
def setupLogger(verbose: bool):
if verbose:
logging.basicConfig(
@ -31,6 +32,7 @@ def setupLogger(verbose: bool):
datefmt="%Y-%m-%d %H:%M:%S",
)
def main() -> int:
try:
a = parse(sys.argv[1:])

View file

@ -5,7 +5,7 @@ from pathlib import Path
def root() -> str | None:
cwd = Path.cwd()
while cwd != Path.root:
while str(cwd) != cwd.root:
if (cwd / "project.json").is_file():
return str(cwd)
cwd = cwd.parent