Skip to content
This repository
Browse code

Proper fix for --no-deps flag default value of 'false' instead of 'un…

…defined'
  • Loading branch information...
commit dcc74f3ce204e4cba322702cf963cb76f44f3b00 1 parent d9bcbe1
Yurii Rashkovskii yrashk authored

Showing 2 changed files with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. +4 4 src/agner_fetch.erl
  2. +1 1  src/agner_main.erl
8 src/agner_fetch.erl
@@ -239,7 +239,7 @@ fetched(fetch_requirements, #state{ opts = #opts_rec{ spec = {spec, Spec} } = Op
239 239 fetched(fetch_deps, #state{ opts = #opts_rec { nodeps = true } } = State) ->
240 240 {next_state, fetched, State};
241 241
242   -fetched(fetch_deps, #state{ opts = #opts_rec{ spec = {spec, Spec}, nodeps = undefined } = Opts } = State) ->
  242 +fetched(fetch_deps, #state{ opts = #opts_rec{ spec = {spec, Spec}, nodeps = false } = Opts } = State) ->
243 243 RebarCommands = proplists:get_value(rebar_fetch_deps_commands, Spec),
244 244 rebar(RebarCommands, Opts),
245 245 fetch_deps_command(Opts),
@@ -467,7 +467,7 @@ current_agner_version() ->
467 467
468 468 build_dep(_ReqName, _ReqVersion, #opts_rec{ nodeps = true }) ->
469 469 ignore;
470   -build_dep(ReqName, ReqVersion, #opts_rec{ spec = {spec, Spec}, directory = Directory0, nodeps = undefined } = Opts) ->
  470 +build_dep(ReqName, ReqVersion, #opts_rec{ spec = {spec, Spec}, directory = Directory0, nodeps = false } = Opts) ->
471 471 Directory =
472 472 case os:getenv("__AGNER_DEP_DIRECTORY") of
473 473 false ->
@@ -484,8 +484,8 @@ build_dep(ReqName, ReqVersion, #opts_rec{ spec = {spec, Spec}, directory = Direc
484 484 {directory, filename:join(deps_dir(Spec, Directory),ReqName)}|
485 485 proplists:delete(spec,rec_to_opts(Opts))]).
486 486 rebar(RebarCommands, #opts_rec{ nodeps = true } = Opts) ->
487   - rebar(RebarCommands ++ ["skip_deps=true"], Opts#opts_rec{ nodeps = undefined });
488   -rebar(RebarCommands, #opts_rec{ spec = {spec, Spec}, nodeps = undefined } = Opts) ->
  487 + rebar(RebarCommands ++ ["skip_deps=true"], Opts#opts_rec{ nodeps = false });
  488 +rebar(RebarCommands, #opts_rec{ spec = {spec, Spec}, nodeps = false } = Opts) ->
489 489 case proplists:get_value(rebar_compatible, Spec) of
490 490 true ->
491 491 ScriptName = filename:absname(escript:script_name()),
2  src/agner_main.erl
@@ -384,7 +384,7 @@ handle_command(uninstall, Opts) ->
384 384
385 385 handle_command(install, Opts) ->
386 386 TmpFile = temp_name(),
387   - handle_command(fetch, [{build, true},{directory, TmpFile},{install, true},{addpath, false}|Opts]),
  387 + handle_command(fetch, [{build, true},{directory, TmpFile},{install, true},{addpath, false},{nodeps, false}|Opts]),
388 388 os:cmd("rm -rf " ++ TmpFile);
389 389
390 390 handle_command(build, Opts) ->

0 comments on commit dcc74f3

Please sign in to comment.
Something went wrong with that request. Please try again.