File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -136,8 +136,11 @@ def _erlang_home_from_erl_path(repository_ctx, erl_path):
136136 erlang_home = str (erl_path .dirname .dirname )
137137 return erlang_home
138138
139+ def _is_windows (repository_ctx ):
140+ return repository_ctx .os .name .lower ().find ("windows" ) != - 1
141+
139142def _default_erlang_dict (repository_ctx ):
140- if repository_ctx . os . name . find ( "windows" ) > - 1 :
143+ if _is_windows ( repository_ctx ) :
141144 if ERLANG_HOME_ENV_VAR in repository_ctx .os .environ :
142145 erlang_home = repository_ctx .os .environ [ERLANG_HOME_ENV_VAR ]
143146 erlang_home = erlang_home .replace ("\\ " , "/" )
@@ -178,17 +181,10 @@ def _default_erlang_dict(repository_ctx):
178181 ),
179182 }
180183 else :
181- repository_ctx .execute (
182- [
183- repository_ctx .which ("echo" ),
184- "RULES_ERLANG: " + "Could not determine erlang version for {}: {}" .format (
185- erl_path ,
186- version .stderr ,
187- ),
188- ],
189- timeout = 1 ,
190- quiet = False ,
191- )
184+ repository_ctx .report_progress ("Could not determine erlang version for {}: {}" .format (
185+ erl_path ,
186+ version .stderr ,
187+ ))
192188 return {
193189 _DEFAULT_EXTERNAL_ERLANG_PACKAGE_NAME : struct (
194190 type = INSTALLATION_TYPE_EXTERNAL ,
You can’t perform that action at this time.
0 commit comments