/usr/local/bin in $PATH in system scripts?

Forest Bond forest at alittletooquiet.net
Thu May 10 13:03:03 UTC 2007


On Wed, May 09, 2007 at 07:03:30PM -0400, Jim Doherty wrote:
> Sorry, I have no idea what ubuntu policy is.   But good defensive
> scripting practice includes setting your $PATH to something safe.  A
> good script should always not trust the environment it was handed along
> with many other things that people don't always do.

I have to disagree.  The environment is precisely the tool available to users to
change the behavior of your script externally.  It's not nice to stomp on user
preferences.

The original problem is user error.  Installing an upgraded perl in /usr/local
without installing all of the needed perl libraries or removing /usr/local/bin
from the default system PATH is incorrect usage.  Don't break features to avoid
user error, please.

-Forest
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20070510/a3d63317/attachment.sig>


More information about the Ubuntu-devel-discuss mailing list