Skip to content

Commit

Permalink
Fix nvim-macos archive name
Browse files Browse the repository at this point in the history
  • Loading branch information
sakhnik committed Aug 11, 2024
1 parent 80d6073 commit 8f5d9ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions test/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
Prerequisites()

test_cmd = ["nvim", "-l", "run-tests.lua", ".", "--no-keep-going"]
# Use the following command to see neovim screen
# test_cmd = ["python", "nvim.py", "+luafile main.lua"]
print(f"Run `{' '.join(test_cmd)}`")
res = subprocess.run(test_cmd)
if res.returncode != 0:
Expand Down
14 changes: 9 additions & 5 deletions utils/testenv_darwin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import platform
import subprocess
import urllib.request

Expand All @@ -16,14 +17,17 @@ def __init__(self, url: str):

subprocess.run('pip install --user six', shell=True, check=True)

urllib.request.urlretrieve(f"{url}/nvim-macos.tar.gz",
"nvim-macos.tar.gz")
# Macos may be running on arm64
machine = platform.machine()

urllib.request.urlretrieve(f"{url}/nvim-macos-{machine}.tar.gz",
f"nvim-macos-{machine}.tar.gz")
subprocess.run(
r'''
tar -xf nvim-macos.tar.gz
f'''
tar -xf nvim-macos-{machine}.tar.gz
cat >"$HOME/bin/nvim" <<EOF
#!/bin/bash
$(pwd)/nvim-macos/bin/nvim "\$@"
$(pwd)/nvim-macos-{machine}/bin/nvim "\\$@"
EOF
chmod +x "$HOME/bin/nvim"
''',
Expand Down

0 comments on commit 8f5d9ac

Please sign in to comment.