Skip to content
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

trying to output to file results in empty file #3

Closed
kikeenrique opened this issue Oct 22, 2020 · 6 comments
Closed

trying to output to file results in empty file #3

kikeenrique opened this issue Oct 22, 2020 · 6 comments

Comments

@kikeenrique
Copy link
Contributor

Hi!✋

I've tried executing redirecting output to a file, using next command, but the file is empty (in order to be archived with a Jenkins job).
/usr/local/bin/goswifty analyze $PATH > result.txt

Executing to standard output does work.

Could this be a bug?

Thanks for your effort.

@rsrbk
Copy link
Owner

rsrbk commented Oct 23, 2020

Hi :)

I might be wrong, but isn't the command supposed to look like this?
/usr/local/bin/goswifty analyze $PATH >> result.txt

I saw in replies in Twitter that people were able to run it in the CI. Can you try some other command line tool and see if it can produce the output?

If it doesn't work I'll try to reach out to someone who managed to set it up on CI.

@kikeenrique
Copy link
Contributor Author

For this problem, there is no real difference in > or >>, the modifier just affects to resulting file (fresh content or append to existing).
Pipes are also not working:
/usr/local/bin/goswifty analyze $PATH | less
Is some kind of problem with with output buffer, I don't understand what's going on. I suspect from TerminalController, but that's all I can guess at the moment.

Could you test it yourself in your command line/terminal of choice? And tell me if it works for you?
I've the same problem using zsh and bash.

@rsrbk
Copy link
Owner

rsrbk commented Nov 1, 2020

@raid5 has just updated the output library in #6.
@kikeenrique could you please check if the issue is solved for you?

@rsrbk
Copy link
Owner

rsrbk commented Nov 1, 2020

Seems like on my computer the issue is still there.

@kikeenrique
Copy link
Contributor Author

Yeah, I'm still reproducing it.

@kikeenrique
Copy link
Contributor Author

Hey, sorry for making you crazy 🤯.
I did test it too fast when I tried on my last answer. I didn't compile and test the same build, i mixed them!!! 😬
So using commit 9af4d107676f780c481f04c62a7224d2a407319d, piping works as expected. 🎉
Thanks for the work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants