Heads-up: postinstall scripts and PATH (Attn all package maintainers)
Robert Collins
rbcollins@cygwin.com
Tue Feb 24 20:14:00 GMT 2004
On Wed, 2004-02-25 at 07:04, Christopher Faylor wrote:
> Wow. I can't believe I fell into this trap. I have been writing shell
> scripts for a long long time and should know better.
>
> Thanks for the heads up. I suspect that this accounts for some strange
> installation problems.
>
> Would it be worthwhile to just have setup.exe put /bin first in the path
> when running these things? I know that the absolutely correct solution
> is to use absolute path names in these scripts but people are going
> to forget, so...
void
init_run_script ()
{
[..]
char old_path[_MAX_PATH];
GetEnvironmentVariable ("PATH", old_path, sizeof (old_path));
SetEnvironmentVariable ("PATH", backslash (cygpath ("/bin") + ";" +
cygpath ("/usr/bin") + ";"
+
old_path).cstr_oneuse());
[...]
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20040224/e28d2db9/attachment.sig>
More information about the Cygwin-apps
mailing list