Code Monkey home page Code Monkey logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
First of all, gnu tee also has the same behaviour and since the wtee is 
analogue of tee this is not an real issue for wtee. Moreover, I've been 
struggling with the same problem you described and finally found out that it is 
the pipe which is responsible on windows platform which prevents from passing 
exit status. There, actually, workaround solutions with reading exit status 
before piping and saving it for further utilization. Anyway, this is not a tee 
who responsible for inability to pass pass exit status. If you have different 
opinion, please let me know. 
Pavel

Original comment by [email protected] on 12 Dec 2010 at 8:47

from wintee.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
Could you please pass more information about the issue with windows ?
Any idea how we could workaround it ? 
Even on the WinApi level.

Thanks!

Original comment by pavel.savara on 8 Nov 2011 at 3:23

from wintee.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
Gnu tee does also have the same issue, but there are workarounds on *nix (see 
http://lists.samba.org/archive/linux/2004-March/010158.html and its links). 
Unfortunately, there don't seem to be documented workarounds for use on 
windows. I am using GnuWin32's tee 
(http://gnuwin32.sourceforge.net/packages/coreutils.htm and elsewhere) and had 
to quit because I need to check the return code of the command I am teeing. So 
how can we use tee on windows and still check return codes?

Original comment by [email protected] on 6 Jun 2012 at 7:58

from wintee.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
In case someone still stumbles over this:
I had the same issue and tried several tee for Windows and workarounds.
Only solution I found is to run the command in powershell. There you have a tee 
and errorlevel/exit code is retained. Can also be passed to the batch file from 
which you called it from (if you leave the rest in a batch file).

Example powershell script:
<mycommand> 2>&1 | tee logs/mylogfilename_$(get-date -f dd.MM.yyyy_HH-mm-ss).log
exit $LastExitCode

Original comment by [email protected] on 16 Apr 2014 at 2:09

from wintee.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.