App-perlbrew icon indicating copy to clipboard operation
App-perlbrew copied to clipboard

Installing to a non-writeable PERLBREW_ROOT incorrectly reports success

Open msouth opened this issue 13 years ago • 6 comments

I had set a PERLBREW_ROOT in my environment that didn't exist and whose parent directly I did not have access to. Doing this:

curl -kL http://install.perlbrew.pl | bash

did report a bunch of errors, e.g. many attempts to write to closed filehandles, but at the end it still said it installed successfully, happy perlbrewing, etc.

This is probably not all that common a case and it's probably not too hard for whoever's fooling with it like this to fix it.

However, it might be a good idea to put in a check for writability in PERLBREW_ROOT and possibly PERLBREW_HOME before going forward with the installation procedure.

And thanks for such a great app!

msouth avatar Jul 18 '12 18:07 msouth

Right... I've been pretty slack dealing with errors like this. Should've spent an hour or two the fully review the code particularly for this :)

gugod avatar Jul 18 '12 20:07 gugod

I will give fixing it a shot if you like but I'm a git newbie for one thing and didn't know what to do with the fatpack or whatever that archiving thing was. I'll dig a little deeper and see if I can make a productive contribution.

msouth avatar Jul 18 '12 22:07 msouth

@msouth, You don't need to run fatback to fix bugs. It should be down only before a release (although I do it frequently.)

If you are intreated, take a look ad dev-bin/build.sh and those README.* documents. The instructions there should be sufficient for you to understand fatback a little bit more :)

gugod avatar Jul 19 '12 04:07 gugod

Thanks, I found the right code (I think) to edit by grepping for PERLBREW_ROOT and/or reading the hacking readme--I'm neck deep in adding "or die()"s to open()s all over lib/App/perlbrew.pm right now.

msouth avatar Jul 19 '12 05:07 msouth

@msouth, sounds good :) Send me a pull request once you're done. I'll merge it!

gugod avatar Jul 19 '12 05:07 gugod

I believe this issue can be closed; I cannot reproduce it, at least.

See details here: https://github.com/gugod/App-perlbrew/issues/273#issuecomment-313969981

zbentley avatar Jul 09 '17 22:07 zbentley