asdf-ruby icon indicating copy to clipboard operation
asdf-ruby copied to clipboard

Default Gems file final empty line

Open jmschp opened this issue 2 years ago • 5 comments

Installing defaults gems skips last gem if no final empty line

Versions:

  • MacBook Pro (Retina, 13-inch, Early 2015) (also tested in Apple M1)
  • macOS Monterey 12.6.3 (21G419)
  • asdf v0.11.1

When installing any ruby version, when it comes to install the default gems, if the file does not have a final empty line, the last gem in the list will not be installed.

jmschp avatar Feb 22 '23 16:02 jmschp

Not speaking for the maintainer, but it's generally considered bad practice to not finish a text file with a newline in Unix system. Many other utilities fail to process "correctly" when their inputs lack a newline.

SeanSith avatar Mar 30 '23 17:03 SeanSith

@SeanSith

I agree, but shit happens some time and we might miss a final empty line.

Maybe, this could be just a warning on the docs.

jmschp avatar Mar 31 '23 07:03 jmschp

Did this ever get fixed? Might be worth making this more flexible and allow a missing newline at the end.

Stratus3D avatar Jun 20 '24 12:06 Stratus3D

Did this ever get fixed? Might be worth making this more flexible and allow a missing newline at the end.

@Stratus3D no it wasn't. I just closed the issue.

jmschp avatar Jun 20 '24 14:06 jmschp

I'm going to re-open this just so it doesn't get lost. This should be an easy fix, I just need to make time to fix it (contributions welcome!)

Stratus3D avatar Jul 02 '24 14:07 Stratus3D

@Stratus3D

Can you have a look ate the related PR?

It's a pretty simple change.

jmschp avatar Nov 19 '24 15:11 jmschp

Fixed with #417 and #424.

Stratus3D avatar Dec 23 '24 17:12 Stratus3D