-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipe output of command into file #73
Comments
Original comment by @techtonik Made PR for that - https://bitbucket.org/hpk42/tox/pull-requests/206/support-piping-command-output-to-file/diff and it worked for me on windows. |
Original comment by johnthagen For reference, opened a ticket with Pylint to see if they will support output to a file natively: pylint-dev/pylint#1070 |
Original comment by johnthagen And for PyLint the |
Original comment by @witten Here's a work-around for this issue:
It's not pretty, but it works. |
Original comment by @hpk42 If you feel that adding support for redirection to files or pipes is easy, please submit a PR. |
Original comment by robvdl flake8 have since added the --output-file option which has saved me in the end, but would it really be that hard to add support for a small amount of pipe characters (> and |, maybe >>)... Windows supports these too. |
Original comment by robvdl I need this feature too, I can't get flake8 output piped to a file for jenkins |
Original comment by @techtonik I am second to request this feature. |
Original comment by mhubig Yes I can, but unfortunately it seems the only way to instruct pylint to write something into a file, is via the "files-output" option, but this results in a couple of files. Luckily the jenkins violations plugin can also handle this situation, by specifying a search wildcard like this: But nevertheless I think it would be a nice feature to generally be able to collect the output of a command into a file. |
Original comment by @hpk42 tox doesn't implement shell semantics (it wouldn't easily work on windows). Can you instruct pylint with an option to write the output somewhere? |
This has not been followed up for a long time and feels to me as trying to fix shortcomings of other tools with something that would turn tox into a maintenance nightmare. Closing for now. |
Probably there is something wrong with If anybody is interested, here is a conflicting patch that I release in public domain - so feel free to pick it, adapt and submit as your own code. ) |
I would rather say that every tool has its limitations and that limitations are not necessarily bad. Tox does not claim to have full shell functionality in the commands section. i don't know if it is feasible to try to add it and I don't know what it would break, but if you have a working alternative implementation of tox, I would be curious to try it. Your link goes only to a handful of unmerged patches. Do you have a fork somewhere, where these patches are integrated into a current version of the tox code? |
as far as im concerned, its a good thing that tox doesn't claim/aim to be a full shell, in fact - you can use make or shell if tox doesnt fit your need (just use the externals) implementing a full shell for tox is very likely a massive and senseless waste of volunteer time, because every step in that direction will bring up new breakages and requests - i think its fine to proclaim "NO" |
Note that the issue title is pipe output of command into file and not full shell implementation in tox. |
Sorry. I am not using |
I really fail to see the problem. What keeps you from piping the output of tox to a file? There must be something special about your workflow that I don't grasp. |
Because I want to see test results on the screen, and look to log only when they fail, and Windows doesn't have |
Yes it does: https://technet.microsoft.com/en-us/library/dd347705.aspx Since windows 10, you can even have a complete Linux subsystem - including bash and apt and whatnot: https://msdn.microsoft.com/de-de/commandline/wsl/install_guide |
@obestwalter okay, it is not true for every Windows user, but there is no powershell on my Windows system. Also, I don't want to learn PowerShell to use tox on Windows. |
okay, I give up then. |
I can use The ticket is closed anyways. |
Hi together,
I need to pipe the output of pylint into a file, so the Jenkins violations plugin can check it later, but unfortunately:
gives me this error:
and
gives me this error:
For now I put the pylint command into the (bash) build command of jenkins, but it would be nice if I could put this into my tox.ini file.
Cheers, Markus
The text was updated successfully, but these errors were encountered: