Handle `eacces` errors in addition to `eperm` in `hipe_compile` command
`hipe_compile` command validation checks that directory can be created and have permissions to write .beam files. System can return `eperm` or `eacces` errors in different conditions, but the meaning of those errors is same.
This commit is contained in:
parent
950a56de4c
commit
05a2a18f52
|
|
@ -46,7 +46,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.HipeCompileCommand do
|
|||
false ->
|
||||
case File.mkdir_p(target_dir) do
|
||||
:ok -> :ok
|
||||
{:error, :eperm} ->
|
||||
{:error, perm} when perm == :eperm or perm == :eacces ->
|
||||
{:error, {:bad_argument, "Cannot create target directory #{target_dir}: insufficient permissions"}}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue