-
Notifications
You must be signed in to change notification settings - Fork 60
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
Fix issue with sshkit escaping $HOME
#88
Conversation
Thanks for the PR! This project lacks automated tests, which makes reviewing and approving PRs somewhat difficult. Please make sure that your contribution has not broken backwards compatibility or introduced any risky changes. Generated by 🚫 Danger |
$HOME
Looks good, thanks for the fix! FYI please do not bump the version; that happens when the maintainer publish a release. I'll fix it up prior to merging. |
But this PR lead below issue and previous version (2.1.4) have no such problem.
|
@Eric-Guo Good catch, I'll revert this PR. Sorry about that! |
Reverted and released as 2.1.6. |
Sorry about that guys. I tested my change on a fresh Debian server and everything seemed to work fine. EDIT: Thinking about it now it might have something to do with my project using https://github.com/capistrano-plugins/capistrano-rbenv-install which installs the Ruby version specified in the project, during the installation. Not quite sure how that could effect it, but it's a likely cause worth looking into |
I tried running the command from @Eric-Guo's error message locally, and got the same error.
Even though I do have Ruby 2.6.5 installed in I think the problem is that
Whereas
|
I use CentOS 7 and installation log can be found in my blog, I think it also not working in AMI Linux as I having one server also. |
For a first deploy to a empty server had to do this workaround:
It seems like issue with sshkit escaping |
It appears that in
sshkit
everything is being escaped except for the "~" sign here: https://github.com/capistrano/sshkit/blob/master/lib/sshkit/backends/abstract.rb#L85So on the code I have changed it runs this check:
instead of this check:
Note the missing
\
before$HOME
.I believe this is intended functionality on
sshkit
, so I'm not creating a PR over there. However that causes an issue here, where it will never return correctly there, even if the directory$HOME/.rbenv
exists.To fix the issue, I replaced
$HOME
with~
which when deploying with my version of the gem, everything then works correctly.