[Slackbuilds-users] chmod invalid option -- 'h' when installing git-tools

Duncan Roe duncan_roe at optusnet.com.au
Tue Apr 22 22:15:06 UTC 2025


On Tue, Apr 22, 2025 at 03:29:29AM -0400, B. Watson wrote:
>
>
> On Tue, 22 Apr 2025, ???????????? ?????????????? wrote:
>
> > It could be an alias too.
>
> If that were possible, it would be an absolute nightmare.
>
> > Heck, shall we use the `/usr/bin` prefix for all of the standard binaries to prevent that?
>
> Aliases don't "survive" sudo's user change. They don't live in the
> environment, so they don't get propagated from your interactive shell
> to the SlackBuild script.
>
> Example:
>
> $ alias foo='echo "gotcha"'
> $ foo
> gotcha
> $ sudo foo
> Password:
> sudo: foo: command not found

It could be an exported function. These do live in the environment and survive
quite a lot of things, possibly including sudo. Starting a script with

#!/bin/bash -p

does prevent it.

If the admins would like, I could make a tree-wide PR or patch - maybe when
Slackware 15.1 appears would suit?

Cheers ... Duncan.


More information about the SlackBuilds-users mailing list