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

Do not crash when unpacking empty packages #75

Open
wojtekmach opened this issue Nov 14, 2019 · 2 comments
Open

Do not crash when unpacking empty packages #75

wojtekmach opened this issue Nov 14, 2019 · 2 comments
Assignees

Comments

@wojtekmach
Copy link
Member

E.g.:

mix hex.package fetch loki 0.1.0 --unpack
** (MatchError) no match of right hand side value: {:error, :enoent}
    (hex 0.20.1) src/mix_hex_tarball.erl:220: :mix_hex_tarball.copy_metadata_config/2
    (hex 0.20.1) src/mix_hex_tarball.erl:209: :mix_hex_tarball.finish_unpack/1
    (hex 0.20.1) lib/hex.ex:183: Hex.unpack_tar!/2
    (hex 0.20.1) lib/mix/tasks/hex.package.ex:114: Mix.Tasks.Hex.Package.fetch/4
    (mix 1.10.0-dev) lib/mix/task.ex:330: Mix.Task.run_task/3
    (mix 1.10.0-dev) lib/mix/cli.ex:83: Mix.CLI.run_task/2
@wojtekmach wojtekmach self-assigned this Nov 14, 2019
@wojtekmach
Copy link
Member Author

 mix hex.package fetch xclient 0.5.0-vendored-xhttp --unpack
** (Mix) Unpacking tarball failed: inner tarball error, no such file or directory

@wojtekmach
Copy link
Member Author

The packages are broken but hex_core should gracefully handle that.

@ericmj ericmj transferred this issue from hexpm/hex Nov 14, 2019
@ericmj ericmj changed the title mix hex.package fetch --unpack is broken on some packages Do not crash when unpacking empty packages Nov 14, 2019
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

1 participant