Skip to content

Commit

Permalink
Fixed broken indices chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
yrashk committed Feb 25, 2011
1 parent c5560cb commit 36799d9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Binary file modified rebar
Binary file not shown.
7 changes: 6 additions & 1 deletion src/agner_github.erl
Expand Up @@ -193,7 +193,12 @@ spec_1(Account, RepoServer, AtFilename) ->
{ok, S} = file:consult(AtFilename),
S
end,
agner_spec:normalize(Spec).
case Spec of
{error, _} = Error ->
Error;
_ ->
agner_spec:normalize(Spec)
end.

spec_url(Account, Name, SHA1) ->
"https://github.com/" ++ proper_repo_name(Account, Name) ++ "/blob/" ++ SHA1 ++ "/agner.config".
Expand Down
8 changes: 6 additions & 2 deletions src/agner_repo_server.erl
Expand Up @@ -73,7 +73,6 @@ clone(Pid, Fun) ->
file(Pid, Filename) ->
gen_server:call(Pid, {file, Filename}).


%%%===================================================================
%%% gen_server callbacks
%%%===================================================================
Expand Down Expand Up @@ -139,7 +138,12 @@ handle_call({clone, Fun}, _From, #state{ directory = undefined, name = Name, ver
ok
end)
end),
{reply, Result, State#state{ directory = Directory }};
case Result of
ok ->
{reply, ok, State#state{ directory = Directory }};
_ ->
{reply, Result, State}
end;

handle_call({clone, _Fun}, _From, #state{} = State) -> %% already cloned
{reply, ok, State};
Expand Down

0 comments on commit 36799d9

Please sign in to comment.