fix: remove redundant sys import and update upgrade() service install references
- Remove inner 'import sys' inside install-service branch (sys already imported at module level on line 8; was triggering PLC0415 smell) - Update two fallback messages in upgrade() from 'muxplex install-service' to 'muxplex service install' — consistent with deprecation warning and doctor() messages updated in Task 5
This commit is contained in:
+2
-4
@@ -630,7 +630,7 @@ def upgrade(*, force: bool = False) -> None:
|
|||||||
subprocess.run(["launchctl", "load", str(plist)], capture_output=True)
|
subprocess.run(["launchctl", "load", str(plist)], capture_output=True)
|
||||||
print(" Service started (legacy)")
|
print(" Service started (legacy)")
|
||||||
else:
|
else:
|
||||||
print(" Service file not found — run: muxplex install-service")
|
print(" Service file not found — run: muxplex service install")
|
||||||
else:
|
else:
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
["systemctl", "--user", "is-enabled", "muxplex"],
|
["systemctl", "--user", "is-enabled", "muxplex"],
|
||||||
@@ -647,7 +647,7 @@ def upgrade(*, force: bool = False) -> None:
|
|||||||
)
|
)
|
||||||
print(" Service started")
|
print(" Service started")
|
||||||
else:
|
else:
|
||||||
print(" Service not enabled — run: muxplex install-service")
|
print(" Service not enabled — run: muxplex service install")
|
||||||
|
|
||||||
# 5. Doctor check
|
# 5. Doctor check
|
||||||
print("\n Verifying...")
|
print("\n Verifying...")
|
||||||
@@ -729,8 +729,6 @@ def main() -> None:
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.command == "install-service":
|
if args.command == "install-service":
|
||||||
import sys
|
|
||||||
|
|
||||||
print(
|
print(
|
||||||
"Warning: 'install-service' is deprecated and will be removed in a future version."
|
"Warning: 'install-service' is deprecated and will be removed in a future version."
|
||||||
" Use 'muxplex service install' instead.",
|
" Use 'muxplex service install' instead.",
|
||||||
|
|||||||
Reference in New Issue
Block a user