[aur-general] TU application_R: Metal A-wing (a-wing)
Bert Peters
bert at bertptrs.nl
Tue Jan 22 12:25:20 UTC 2019
David Runge schreef op 2019-01-22 12:30:
> On 2019-01-22 17:09:35 (+0800), Metal A-wing wrote:
>> On Tue Jan 8 20:19:43 UTC 2019, David Runge wrote:
>> Why is use
>> `$(gem env gemdir)`
>>
>> Instead of
>>
>> `$(ruby -e'puts Gem.default_dir')`
> It's shorter and you don't have to spawn a ruby process to print
> something, if you can use the gem command directly.
I'm not a TU so take my this with a grain of salt, but I don't think
this is the best advice.
It's shorter, admittedly, but `gem` spawns a ruby process just as the
`ruby` version does. Using gem doesn't work however when `$GEM_HOME` is
set, since then it reports the contents of that variable.
Especially for AUR packages using `$(ruby -e'puts Gem.default_dir')` is
more convenient since most users do not build in a clean chroot, and the
wiki actually recommends settings that environment variable so quite a
few will have it.
Best,
Bert Peters.
More information about the aur-general
mailing list