-
Notifications
You must be signed in to change notification settings - Fork 784
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
feat: add plugin location when update the plugin #1602
Conversation
It is a feature created by recommendation of issue 1573.
Observation:In the test code, i tried to implement get_full_path to check the output with expected output , the get_full_path function in the test appears to be returning only the plugin name instead of the full path to the plugin. I don´t know if it is the expected behavior |
I don't see any @test "asdf plugin-update prints the location of plugin (specific)" {
local plugin_path
plugin_path="$(get_plugin_path dummy)"
run asdf plugin-update dummy
local expected_output="Plugin dummy location: $plugin_path"
[[ "$output" == *"$expected_output"* ]]
}
|
LGTM, my only comment is that the wording might be a little confusing - perhaps Edit: I have added this PR to the list of ones that I would like to see merged for the upcoming |
Unfortunately, I cannot run the GitHub actions test workflow, but I have ran locally and it seems there a few other failing tests such as It looks like current tests don't take into account that this can be printed first. It looks like adding an asterisk to the glob test fixes things: [[ "$output" = *"UPDATE dummy"*"${expected_output}" ]] |
Thanks for your suggestions, i will resee my code and check the tests this week |
Hmm, I only get the same error as before: ✗ asdf plugin-update executes configured pre hook (specific)
(in test file test/plugin_update_command.bats, line 188)
`[[ "$output" = "UPDATE"*"${expected_output}" ]]' failed It might be an issue with your computer only . The |
Hello, it was a simple change, is there any impediment or problem that I can solve for this pull request to be finished? |
@edvardsanta I'm not sure if you forgot to push your changes, I'm still getting the error: $ bats test/plugin_update_command.bats --print-output-on-failure
plugin_update_command.bats
✓ asdf plugin-update should pull latest default branch (refs/remotes/origin/HEAD) for plugin
✓ asdf plugin-update should pull latest default branch (refs/remotes/origin/HEAD) for plugin even if default branch changes
✓ asdf plugin-update should pull latest default branch (refs/remotes/origin/HEAD) for plugin even if the default branch contains a forward slash
✓ asdf plugin-update should pull latest default branch (refs/remotes/origin/HEAD) for plugin even if already set to specific ref
✓ asdf plugin-update should not remove plugin versions
✓ asdf plugin-update should not remove plugins
✓ asdf plugin-update should not remove shims
✓ asdf plugin-update done for all plugins
✓ asdf plugin-update executes post-plugin update script
✓ asdf plugin-update executes post-plugin update script if git-ref updated
✓ asdf plugin-update executes configured pre hook (generic)
✗ asdf plugin-update executes configured pre hook (specific)
(in test file test/plugin_update_command.bats, line 188)
`[[ "$output" = "UPDATE"*"${expected_output}" ]]' failed
Last output:
Location of dummy plugin: /tmp/asdf with spaces.9nU1/home/.asdf/plugins/dummy
UPDATE
Updating dummy to master
Already on 'master'
Your branch is up to date with 'origin/master'.
plugin updated path=/tmp/asdf with spaces.9nU1/home/.asdf/plugins/dummy old git-ref=b809aa8 new git-ref=b809aa8
✓ asdf plugin-update executes configured post hook (generic)
✓ asdf plugin-update executes configured post hook (specific)
✓ asdf plugin-update prints the location of plugin (specific)
15 tests, 1 failure |
Once the test is fixed, then it is up to one of the active maintainers @Stratus3D or @jthegedus to run the workflow and merge it. I'm not sure when that will be - as you can see there are currently some other PRs in the backlog. |
asdf plugin-update executes configured pre hook (specific) was failing
could u test it again? |
Checked the diff and I believe the test suite will pass fully. I can't merge your PR here, but I'll cherry-pick and squash your commits (and some from other existing PRs) into my fork and make a release later today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! And thanks for the review @hyperupcall
It is a feature created by recommendation of issue 1573.
Summary
Display plugin location when calling plugin update
Closes: #1573
Currently that is just