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

mix distillery.release give :eacces error #748

Closed
shivam-tripathi opened this issue Jan 17, 2023 · 1 comment
Closed

mix distillery.release give :eacces error #748

shivam-tripathi opened this issue Jan 17, 2023 · 1 comment

Comments

@shivam-tripathi
Copy link

Steps to reproduce

I was following the guide: https://hexdocs.pm/distillery/introduction/installation.html

Add deps

{:distillery, "~> 2.1"}
mix distillery.release

Verbose Logs

Verbose: https://gist.github.com/shivam-tripathi/a85a4431d9a943002b963a867413351a
Short:

==> Release failed: no match of right hand side value: {:error, :eacces}
    (distillery 2.1.1) lib/distillery/releases/assembler.ex:865: Distillery.Releases.Assembler.create_RELEASES/2
    (distillery 2.1.1) lib/distillery/releases/assembler.ex:290: Distillery.Releases.Assembler.write_release_scripts/1
    (distillery 2.1.1) lib/distillery/releases/assembler.ex:50: Distillery.Releases.Assembler.assemble/1
    (distillery 2.1.1) lib/distillery/tasks/release.ex:130: Mix.Tasks.Distillery.Release.do_release/2
    (mix 1.13.4) lib/mix/task.ex:397: anonymous fn/3 in Mix.Task.run_task/3
    (mix 1.13.4) lib/mix/cli.ex:84: Mix.CLI.run_task/2
    (elixir 1.13.4) src/elixir_compiler.erl:73: :elixir_compiler.dispatch/4
    (elixir 1.13.4) src/elixir_compiler.erl:58: :elixir_compiler.compile/3

Description of issue

I am getting :eacces error when I trigger mix distillery.release - at line number lib/distillery/releases/assembler.ex:863.
Because of this I am not able to create a release using distillary.
I updated config.ex using {:distillery, "~> 2.1", path: 'deps/distillery'}, and updated deps/distillery/releases/assembler.ex with values:

Shell.debug("Generating RELEASES #{old_cwd} #{output_dir} #{relfile}")

It prints the following:

==> Generating RELEASES /Users/st/myapp _build/dev/rel/myapp /Users/st/myapp/_build/dev/rel/myapp/releases/0.1.0/myapp.rel

I checked if the _build has write permission issues:

if [ -w "./_build" ]; then echo "WRITABLE"; else echo "NOT WRITABLE"; fi

This prints WRITABLE.

@shivam-tripathi
Copy link
Author

shivam-tripathi commented Jan 17, 2023

Looks like a duplicate of #744 (comment)
Making the change suggested in the code fixed the issue on local. It would be great if we can fix the issue in the library itself, it'll help with CI/CD.

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