Actions
Backport #4980
closedrbinstall.rb will not install command scripts if the path contains a hidden directory
Status:
Rejected
Assignee:
-
Description
I tried to compile and install ruby from a longish path containing a hidden directory somewhere in the middle of the path.
While installing the "command scripts" rbinstall.rb containts the following line:
next if //[.#]|(.(old|bak|orig|rej|diff|patch|core)|~|/core)$/i =~ src
The first part of the regex should probably only match on the basename of the file to install. But as src contains the absolute path of the file it will match all files if the path contains a hidden directory somewhere. (Which it did in my case.)
I currently pached it with a small sed-script:
sed -i 's=[.#]|=[.#][^\\\/]$|=' ruby/tool/rbinstall.rb
But the nicer solution is probably to match on the basename only.
Actions
Like0
Like0Like0Like0Like0