-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ruby: Workaround ruby-lsp issue with bundler
ruby-lsp calls bundle with an undocumented version number argument supported by RubyGems binstubs. Portage binstubs don't support this. Use a wrapper to throw away the version number argument. See: Shopify/ruby-lsp#3022
- Loading branch information
1 parent
f432d6e
commit dc6ce2d
Showing
3 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class nest::base::ruby { | ||
# Workaround ruby-lsp issue calling bundle with version argument | ||
# See: https://github.com/Shopify/ruby-lsp/issues/3022 | ||
exec { '/bin/mv /usr/bin/bundle /usr/bin/bundle.real': | ||
onlyif => '/bin/grep -E "Generated by ruby-fakegem.eclass" /usr/bin/bundle', | ||
} | ||
-> | ||
file { '/usr/bin/bundle': | ||
mode => '0755', | ||
owner => 'root', | ||
group => 'root', | ||
content => @(WRAPPER), | ||
#!/bin/bash | ||
[[ $1 == _*_ ]] && shift | ||
exec /usr/bin/bundle.real "$@" | ||
| WRAPPER | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters