mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Fix error where ebin was created as a file
This patch remedies an issue where the ebin directory would be erroneously created as a file by the first "mv" command in rebar_protobuffs_compile.erl [line 106] if the ebin file did not exist at the root application level. In essence, the patch ensures that the ebin directory exists at the application directory level before any "mv" commands are executed. The following code was inserted at line 106: ok = filelib:ensure_dir(filename:join("ebin","dummy")),
This commit is contained in:
parent
9c0d51bc0b
commit
f83f18eb3b
1 changed files with 1 additions and 0 deletions
|
@ -103,6 +103,7 @@ compile_each([{Proto, Beam, Hrl} | Rest]) ->
|
||||||
%% Compilation worked, but we need to move the .beam and .hrl file
|
%% Compilation worked, but we need to move the .beam and .hrl file
|
||||||
%% into the ebin/ and include/ directories respectively
|
%% into the ebin/ and include/ directories respectively
|
||||||
%% TODO: Protobuffs really needs to be better about this...sigh.
|
%% TODO: Protobuffs really needs to be better about this...sigh.
|
||||||
|
ok = filelib:ensure_dir(filename:join("ebin","dummy")),
|
||||||
[] = os:cmd(?FMT("mv ~s ebin", [Beam])),
|
[] = os:cmd(?FMT("mv ~s ebin", [Beam])),
|
||||||
ok = filelib:ensure_dir(filename:join("include", Hrl)),
|
ok = filelib:ensure_dir(filename:join("include", Hrl)),
|
||||||
[] = os:cmd(?FMT("mv ~s include", [Hrl])),
|
[] = os:cmd(?FMT("mv ~s include", [Hrl])),
|
||||||
|
|
Loading…
Reference in a new issue