fix: incorrect type comparaison lead to infinite loop when not in ck project
This commit is contained in:
parent
d912e7d4ce
commit
b9fa1422a4
|
@ -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:])
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue