diff options
author | Charles McKnight <cmcknight@pheonic.com> | 2011-01-05 16:00:00 -0800 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-01-06 12:30:32 +0100 |
commit | f83f18eb3bcaebc746c72ffe728379c9a44668f1 (patch) | |
tree | 8091fec1992e52575fff99d97e8a1fd944ca4b29 | |
parent | 9c0d51bc0be4ae1f141ab25a12724d97ffc7c0a7 (diff) |
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")),
-rw-r--r-- | src/rebar_protobuffs_compiler.erl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rebar_protobuffs_compiler.erl b/src/rebar_protobuffs_compiler.erl index 122440c..2a2139f 100644 --- a/src/rebar_protobuffs_compiler.erl +++ b/src/rebar_protobuffs_compiler.erl @@ -103,6 +103,7 @@ compile_each([{Proto, Beam, Hrl} | Rest]) -> %% Compilation worked, but we need to move the .beam and .hrl file %% into the ebin/ and include/ directories respectively %% 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])), ok = filelib:ensure_dir(filename:join("include", Hrl)), [] = os:cmd(?FMT("mv ~s include", [Hrl])), |