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

Silence 7zip when unpacking #143

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

arnaudh
Copy link

@arnaudh arnaudh commented Jul 30, 2021

Fixes #142

Copy link
Owner

@oxinabox oxinabox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you bump the version so i can tag also?

end

@testset "sad case" begin
@test_throws Exception unpack("assets/non-existent.zip")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is spelt wrong but:

Suggested change
@test_throws Exception unpack("assets/non-existent.zip")
# depending on Julia version maybe ErrorException or ProcessExittedExcept
@test_throws Union{ErrorException,ProcessExittedException} unpack("assets/non-existent.zip")

Comment on lines +6 to +15
std = stdout
r, w = redirect_stdout()
try
f()
finally
redirect_stdout(std)
close(w)
end
output = read(r, String)
return output
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we do: const capture_stdout = sprint ∘ redirect_stdout ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting, let me look into that (copy pasting this results in an error, but may be workable)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think there must be a much shorter way to do this.
Did you get a chance to look at it?

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

Successfully merging this pull request may close these issues.

Ability to silence 7zip output
2 participants