Skip to content

Commit 78ea217

Browse files
committed
Update 1 code files
Modified: • src/omnipkg/dispatcher.py (+10/-3 lines) [gitship-generated]
1 parent 3f82bb1 commit 78ea217

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

src/omnipkg/dispatcher.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,12 @@ def main():
237237
and argv_commands[1] == "logs"
238238
and "-f" in sys.argv
239239
)
240-
is_interactive_command = is_info_command or is_config_command or is_logs_follow
240+
is_uninstall_python = (
241+
len(argv_commands) >= 1
242+
and argv_commands[0] == "uninstall"
243+
and any("python" in a for a in argv_commands[1:])
244+
)
245+
is_interactive_command = is_info_command or is_config_command or is_logs_follow or is_uninstall_python
241246

242247
if not is_swap_command and not is_daemon_lifecycle and not is_interactive_command:
243248
try:
@@ -655,12 +660,14 @@ def _push_binary_to_bin_dir(native_bin, target_bin, src_hash: str, debug: bool)
655660
print(f"[C-INSTALL] push: {src_binary} -> {target_bin}", file=sys.stderr)
656661

657662
replaced = []
663+
_exe = ".exe" if sys.platform == "win32" else ""
658664
for name in ("8pkg", "omnipkg", "OMNIPKG", "8PKG"):
659-
target = target_bin / name
665+
target = target_bin / (name + _exe)
660666
if target.exists():
661667
try:
662668
shutil.copy2(str(src_binary), str(target))
663-
os.chmod(str(target), 0o755)
669+
if sys.platform != "win32":
670+
os.chmod(str(target), 0o755)
664671
replaced.append(name)
665672
except Exception as e:
666673
if debug:

0 commit comments

Comments
 (0)