#1572 TEMP env var is corrupted when running external app

MSYS
pending
None
Bug
rejected
Unknown
False
2013-02-08
2011-08-14
No

On my machine, TEMP environment variable is defined as 'D:\Temp'.

When I run msys, 'echo $TEMP' gives '/tmp', and 'msysmnt' shows that D:\Temp is mounted on /tmp. That's fine.

When I run an external application from msys, the TEMP variable is modified to 'D:/Temp'.

To reproduce: Run msys, from it, run cmd /c "echo %TEMP%"

Discussion

<< < 1 2 3 4 5 > >> (Page 2 of 5)
  • Orgad Shaneh

    Orgad Shaneh - 2011-08-16

    I'm not talking about running things directly from msys bash prompt. What I'm talking about is running an external application, which expects %TEMP% to have specific form.

    In my case, the application I run is cleartool, which runs triggers for some operations. Those triggers don't work because of that manipulation.

    I just tried to show the problem using a simple example. I really find it hard to understand why you're trying so hard to justify this kind of manipulation. It really makes no sense to me...

     
  • Earnie Boyd

    Earnie Boyd - 2011-08-17

    > I really find it hard to understand why you're trying so hard to justify this kind of manipulation.

    MSYS has been out for years and no one else has complained.

    > In my case, the application I run is cleartool, which runs triggers for some operations. Those triggers don't work because of that manipulation.

    Finally!!! What is cleartool and what is it doing with triggers to cause an issue with the value of %TEMP% using a / instead of a \? I assume this is a command line tool that you're using in the MSYS shell. Do you have a link to the product you're using and is it open source?

     
  • Orgad Shaneh

    Orgad Shaneh - 2011-08-17

    cleartool is the command-line tool for Rational ClearCase, which is neither open-source nor free. It is a (terrible!) version control system.

    One of its capabilities is running 'triggers' when certain operations are executed. In my case, when I run 'mkactivity', it runs a trigger that tests against the DB if the activity I requested is valid. This trigger is a perl script, and it just fails when %TEMP% has / instead of \.

     
  • Earnie Boyd

    Earnie Boyd - 2011-08-17

    So, the perl script fails? Which perl is it running? Is the error raised by the script itself or by perl?

     
  • Orgad Shaneh

    Orgad Shaneh - 2011-08-17

    The perl script runs isqlw, and some of its arguments are "-i D:/TEMP\ForClearCase.sql -o D:/TEMP\SqlOutputQuery.txt" (The D:/Temp is parsed by perl). isqlw fails.

     
  • Earnie Boyd

    Earnie Boyd - 2011-08-17

    Which perl.exe is being executed?

    What, if any, is the error message from isqlw?

     
  • Orgad Shaneh

    Orgad Shaneh - 2011-08-17

    Rational perl (part of ClearCase) C:\Program Files\Rational\Common\ratlperl.exe.

    The error message is 'A file open failure occured on D:'

     
  • Andrew

    Andrew - 2011-08-17

    From my brief look at this issue, it appears that when Windows' cmd.exe is run from an MSYS environment, it is inheriting the MSYS shell's environment variables (which I would expect). However, it looks like only the PATH environment variable gets its slashes converted to the proper convention (/ for MSYS, \ for Windows).

    For example: Spawning cmd.exe from an MSYS bash shell and running "set" shows my TEMP environment variable as C:/Users/Username/AppData/Local/Temp, while the PATH is correctly converted to C:\msys\mingw\bin;C:\msys\bin; et cetera.

     
  • Orgad Shaneh

    Orgad Shaneh - 2011-08-17

    That's exactly what I described in the first place. Thank you for elaborating.

     
  • Earnie Boyd

    Earnie Boyd - 2011-08-17

    A work around may be to edit your $HOME/.profile file and add
    export TEMP='D:\TEMP'
    as a command in your environment setup.

     
<< < 1 2 3 4 5 > >> (Page 2 of 5)

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks