style(update): remove unused sys import
Oops, sys is still used by sys.executable. Restored.
This commit is contained in:
@@ -10,6 +10,7 @@ from rich.console import Console
|
|||||||
from myclaude.project_root import get_myclaude_project_root
|
from myclaude.project_root import get_myclaude_project_root
|
||||||
|
|
||||||
console = Console()
|
console = Console()
|
||||||
|
stderr_console = Console(stderr=True)
|
||||||
|
|
||||||
|
|
||||||
def _run_make_install(root: Path) -> int:
|
def _run_make_install(root: Path) -> int:
|
||||||
@@ -31,10 +32,9 @@ def update_cmd() -> None:
|
|||||||
root = get_myclaude_project_root()
|
root = get_myclaude_project_root()
|
||||||
fallback = Path.home() / ".myclaude"
|
fallback = Path.home() / ".myclaude"
|
||||||
if root == fallback:
|
if root == fallback:
|
||||||
console.print(
|
stderr_console.print(
|
||||||
"[red]Not inside myclaude repo.[/red] Set [cyan]MYCLAUDE_PROJECT_ROOT[/cyan] "
|
"[red]Not inside myclaude repo.[/red] Set [cyan]MYCLAUDE_PROJECT_ROOT[/cyan] "
|
||||||
"or run from the clone.",
|
"or run from the clone.",
|
||||||
file=sys.stderr,
|
|
||||||
)
|
)
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
|
||||||
@@ -49,6 +49,6 @@ def update_cmd() -> None:
|
|||||||
rc = _run_pip_editable(root)
|
rc = _run_pip_editable(root)
|
||||||
|
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
console.print("[red]Update failed.[/red]", file=sys.stderr)
|
stderr_console.print("[red]Update failed.[/red]")
|
||||||
raise SystemExit(rc)
|
raise SystemExit(rc)
|
||||||
console.print("[green]myclaude updated.[/green]")
|
console.print("[green]myclaude updated.[/green]")
|
||||||
|
|||||||
Reference in New Issue
Block a user