소스 검색

Merge pull request #2295 from ferd/support-mix-env-outdir

Support ENV var for mix in the bare compiler
pull/2296/head
Fred Hebert 5 년 전
committed by GitHub
부모
커밋
e33916734d
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. +5
    -1
      src/rebar_prv_bare_compile.erl

+ 5
- 1
src/rebar_prv_bare_compile.erl 파일 보기

@ -53,7 +53,11 @@ do(State) ->
{RawOpts, _} = rebar_state:command_parsed_args(State),
Paths = proplists:get_value(paths, RawOpts),
Sep = proplists:get_value(separator, RawOpts, " "),
OutDir = proplists:get_value(outdir, RawOpts, rebar_dir:get_cwd()),
%% Because mix won't check for versions, it instead sets this variable
%% that it knows older rebar3 version will ignore so we play nice and
%% honor it.
DefaultOutDir = os:getenv("REBAR_BARE_COMPILER_OUTPUT_DIR", rebar_dir:get_cwd()),
OutDir = proplists:get_value(outdir, RawOpts, DefaultOutDir),
[ code:add_pathsa(filelib:wildcard(PathWildcard))
|| PathWildcard <- rebar_string:lexemes(Paths, Sep) ],

불러오는 중...
취소
저장