Skip to content

Commit 83c73ec

Browse files
committed
Fix IndentationError and NameError in cli.py
- Fixed indentation of 'elif args.command == "swap"' block - Added is_interactive variable definition after args parsing - Resolves syntax errors that prevented 8pkg command from running
1 parent 4f97325 commit 83c73ec

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/omnipkg/cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,9 @@ def main():
953953

954954
args = parser.parse_args(remaining_args)
955955
# --- [ DAEMON PRE-FLIGHT CHECK & RELAUNCH ] ---
956+
957+
# Determine if running in interactive mode
958+
is_interactive = sys.stdin.isatty() and sys.stdout.isatty()
956959
# This is the safest place: after args are parsed, before core logic runs.
957960
# Commands that do NOT require the daemon to be running.
958961
DAEMONLESS_COMMANDS = [
@@ -1079,8 +1082,7 @@ def main():
10791082
return pkg_instance.switch_active_python(args.version)
10801083
else:
10811084
parser.print_help()
1082-
is_interactive = sys.stdin.isatty() and sys.stdout.isatty()
1083-
elif args.command == "swap":
1085+
elif args.command == "swap":
10841086
if not args.target:
10851087
safe_print(_("❌ Error: You must specify what to swap."))
10861088
safe_print(_("Examples:"))

0 commit comments

Comments
 (0)