Skip to content

Commit

Permalink
fix: resolve coreutils/macos incompatiblity (#29)
Browse files Browse the repository at this point in the history
* swap `cr -a` for `cr -LR`
* add test with latest coreutils on all platforms
  • Loading branch information
MetricMike authored Jun 13, 2023
1 parent 0eaca73 commit 485a11e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,37 @@ jobs:
cli-version:
- "latest:1"
- "latest:2"
coreutils:
- default
- latest
runs-on: ${{ matrix.os }}
steps:
- name: Setup homebrew if using latest coreutils
if: matrix.coreutils == 'latest'
uses: Homebrew/actions/setup-homebrew@master

- name: Try installing latest GNU coreutils
if: matrix.coreutils == 'latest'
run: |
brew update
brew install coreutils
echo "$(brew --prefix)/opt/coreutils/libexec/gnubin" >> "${GITHUB_PATH}"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Check paths and coreutils version if using latest
if: matrix.coreutils == 'latest'
run: |
which cp
cp --version
which python
python --version
"${pythonLocation}/bin/python" --version
echo "${GITHUB_PATH}"
echo "${PATH}"
- name: asdf_plugin_test
uses: asdf-vm/actions/plugin-test@v2
Expand Down
4 changes: 2 additions & 2 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ install_v2_macos_bundled_installer() {
install_path="$2"
# requires rosetta on M1 macs

mkdir -p "${install_path}/bin"
pkgutil --expand-full "${download_path}/AWSCLIV2.pkg" "${download_path}/tmp-awscliv2"
cp -a "${download_path}/tmp-awscliv2/aws-cli.pkg/Payload/aws-cli/" "${install_path}"
cp -LR "${download_path}/tmp-awscliv2/aws-cli.pkg/Payload/aws-cli/"* "${install_path}"
mkdir -p "${install_path}/bin"
ln -snf "${install_path}/aws" "${install_path}/bin/aws"
ln -snf "${install_path}/aws_completer" "${install_path}/bin/aws_completer"
rm -rf "${download_path}/tmp-awscliv2"
Expand Down

0 comments on commit 485a11e

Please sign in to comment.