asdf
asdf copied to clipboard
fix: reshim local path (#1286)
Summary
change sed delimiter character from /
to |
to prevent reshim local path error(sed delimiter character conflict)
Fixes: #1286
Other Information
maybe we could use a better delimiter character for this scenario?
Can you add a test case for regression testing?
Can you add a test case for regression testing?
Hi, I add a test case for testing, could you please review the change?
another question need help~
I pass the test suite case in my MacBook, but can't be passed here, is there any approach to solve this issue?
another question need help~ I pass the test suite case in my MacBook, but can't be passed here, is there any approach to solve this issue?
This can be challenging. It looks like the new test is failing in Github actions because one of the commands it runs exited with a non-zero exit status. I typically echo
the $output
of the command before asserting the exit code is 0
when debugging issues like that. Usually $output
holds the answer to the issue, and BATS will take whatever you print and render it to the test output so it will be visible in the runner output. Hope this helps!
can anyone review the new change?
@alexezio please review the failed status checks
@jthegedus hello, jthegedus: I fix the unit-test issue, could you please approve for auto-test again?
It seems like all unit-test are passed, so could this pr be approved?
@alexezio Sorry for my absence and delay here. Can you address the Shellcheck issue?
In
lib/commands/reshim.bash
line 93:sed -i.bak -e '$i\'$'\n'"# asdf-plugin: ${plugin_name} ${version}" "$shim_path"
^-- SC1003 (info): Want to escape a single quote? echo'This is how it'\''s done'
.For more information: https://www.shellcheck.net/wiki/SC1003 -- Want to escape a single quote? ec...
@jthegedus hi, sorry for my absence. I check the shellcheck error, and I think that is not a issue.
The backslash \
after $i
means that insert the text after the backslash to the last line without needed a /pattern/ for the last line. so it can't be quoted. the $
symol that surrended with single quote string represent the end of old lines.
And I try to solve the shell format, but it doesn't work. So could you pelease review this?
From @dylan-chong from - https://github.com/asdf-vm/asdf/pull/1311#issuecomment-1200322501
@alexezio This means that the change to the sed pattern in your PR https://github.com/asdf-vm/asdf/pull/1287 is not longer required. But it would still be great to merge the test that you wrote in your PR. I have checked and that test passes in this branch, but I don't want to steal your contribution so I'll let you commit that :)
Let's:
- remove the changes here to
lib/commands/reshim.bash
- rebase
- resolve conflicts for
test/
and get this test case in and close out this PR.
Thanks for writing the test for this @alexezio ! And thanks for getting this merged @jthegedus !