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

Escript creation failure reason swallowed by post-hook failure. #2839

Open
richcarl opened this issue Oct 19, 2023 · 1 comment
Open

Escript creation failure reason swallowed by post-hook failure. #2839

richcarl opened this issue Oct 19, 2023 · 1 comment

Comments

@richcarl
Copy link
Contributor

throw:Err=?PRV_ERROR(_) -> Err

This catch was introduced in #2532 but there is still a problem: if the escript creation fails and the exception is caught, the call to rebar_hooks:run_all_hooks() below will be executed and will likely fail in itself since there will be no _build/prod/bin/rebar3 to copy. This will cause the first exception to be forgotten, and you simply get _build/prod/bin/rebar3: No such file or directory and Hook for escriptize failed! without a clue as to why. (The actual error was {bad_app, App} just as added in #2532.)

Not sure what solution you would prefer, but skipping the post-hooks if creation fails seems reasonable to me.

@ferd
Copy link
Collaborator

ferd commented Oct 20, 2023

I think this may be a duplicate of #2798

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