fix no return

This commit is contained in:
Khaleel Al-Adhami 2024-11-01 15:30:47 -07:00
parent f8169795f1
commit 8955410d1d

View File

@ -233,7 +233,7 @@ def get_package_manager(on_failure_return_none: bool = False) -> str | None:
"""
npm_path = path_ops.get_npm_path()
if npm_path is not None:
npm_path = str(Path(npm_path).resolve())
return str(Path(npm_path).resolve())
if on_failure_return_none:
return None
raise FileNotFoundError("NPM not found. You may need to run `reflex init`.")