Skip to content

Commit

Permalink
fix: use macos compatible sed syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed AbouZaid <[email protected]>
  • Loading branch information
aabouzaid committed Sep 22, 2024
1 parent 7d20c03 commit 568a8d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ jobs:
asdf-plugin-manager list
asdf-plugin-manager add-all
asdf plugin list --refs
asdf-plugin-manager update-all
- name: Validate installed plugins
run: |
set -euox pipefail
PLUGIN_GIT_REF=$(grep -oE "[^ ]\w{6}$" test/.plugin-versions)
asdf plugin list --refs | grep "${PLUGIN_GIT_REF}" &&
echo "[Passed] The plugin git ref in test/.plugin-versions matches the installed one."
- name: Test asdf-plugin-manager cli - remove
run: |
cd test
asdf-plugin-manager remove-all
asdf plugin list
4 changes: 3 additions & 1 deletion cli/asdf-plugin-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ update_plugins() {
fi

echo "[INFO] Updating git-ref in plugin version file: $(print_plugin_versions_filename)"
sed -i "/^\b${plugin_name}\b/ s/${plugin_ref_managed}/${plugin_ref_after_update}/" "$(print_plugin_versions_filename)"
cat "$(print_plugin_versions_filename)" |
sed "/^\b${plugin_name}\b/ s/${plugin_ref_managed}/${plugin_ref_after_update}/" |
tee "$(print_plugin_versions_filename)"

echo '!!!'
echo "[CAUTION] Please review the changes since last update:"
Expand Down

0 comments on commit 568a8d9

Please sign in to comment.