summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrank Hunleth <fhunleth@troodon-software.com>2016-03-06 11:04:21 -0500
committerLuis Rascão <luis.rascao@gmail.com>2016-03-13 01:00:58 +0000
commite1f7e6a51f5781c626f8d793337215dd70aa7859 (patch)
tree0f5573cf3748a99e74fe682beee2190d83e22a4e /src
parent13a570ed93220564460562e07fda9d90a0dd18dd (diff)
downloadrebar-e1f7e6a51f5781c626f8d793337215dd70aa7859.tar.gz
Fix bug when running gcc in cross_sizeof
The test program used to determine the word size of a crosscompiler is crafted to return an error, so this changes the logic to expect an error exit. If the crosscompiler actually compiles the test program successfully, that would be remarkable and worthy of investigation.
Diffstat (limited to 'src')
-rw-r--r--src/rebar_utils.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 64595a2..1fb5419 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -760,7 +760,7 @@ cross_sizeof(Arch, Type) ->
>>),
Cmd = Compiler ++ " -DTYPE=\""++Type++"\" " ++ TempFile,
ShOpts = [{use_stdout, false}, return_on_error],
- {ok, Res} = sh(Cmd, ShOpts),
+ {error, {_,Res}} = sh(Cmd, ShOpts),
ok = file:delete(TempFile),
case string:tokens(Res, ":") of
[_, Ln | _] ->