Skip to content

Commit 235367f

Browse files
committed
fix: fix windows shim detection
Modified: • src/omnipkg/dispatcher.py (+3/-2 lines) [gitship-generated]
1 parent ae30540 commit 235367f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/omnipkg/dispatcher.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,13 +547,14 @@ def _install_binary_into_bin_dir(binary_tmp, target_bin, src_hash: str, debug: b
547547
replaced = []
548548
target_bin = Path(target_bin)
549549

550+
_exe = ".exe" if sys.platform == "win32" else ""
550551
for name in ("8pkg", "omnipkg", "OMNIPKG", "8PKG"):
551-
target = target_bin / name
552+
target = target_bin / (name + _exe)
552553
if target.exists():
553554
try:
554555
shutil.copy2(str(binary_tmp), str(target))
555556
os.chmod(str(target), 0o755)
556-
replaced.append(str(target_bin / name))
557+
replaced.append(str(target))
557558
except Exception as e:
558559
if debug:
559560
print(f"[C-INSTALL] could not replace {target}: {e}", file=sys.stderr)

0 commit comments

Comments
 (0)