Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install scie-pants in ~/.local/bin instead of ~/bin #144

Merged
merged 4 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Ensure default install path is on PATH
# Do this here so that we can change the path before updating the init-pants action.
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Setup Pants
uses: pantsbuild/actions/init-pants@v4-scie-pants
with:
Expand Down
4 changes: 2 additions & 2 deletions get-pants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Once installed, if you want to update your "pants" launcher binary, use
-h | --help: Print this help message.

-d | --bin-dir:
The directory to install the scie-pants binary in, "~/bin" by default.
The directory to install the scie-pants binary in, "~/.local/bin" by default.

-b | --base-name:
The name to use for the scie-pants binary, "pants" by default.
Expand All @@ -176,7 +176,7 @@ Once installed, if you want to update your "pants" launcher binary, use
EOF
}

bin_dir="${HOME}/bin"
bin_dir="${HOME}/.local/bin"
base_name="pants"
version="latest/download"
while (($# > 0)); do
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pantsup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ def test_installs_pants(tmp_path: Path) -> None:
assert b"Downloading and installing the pants launcher" in proc.stderr
assert b"Installed the pants launcher from" in proc.stderr

bin_path = tmp_path / "bin" / "pants"
bin_path = tmp_path / ".local" / "bin" / "pants"
assert os.path.isfile(bin_path)
assert os.access(bin_path, os.X_OK)