瀏覽代碼

remove replacement of home dir with ~ in update output

pull/755/head
Tristan Sloughter 9 年之前
父節點
當前提交
00a4a44547
共有 2 個檔案被更改,包括 2 行新增7 行删除
  1. +0
    -5
      src/rebar_file_utils.erl
  2. +2
    -2
      src/rebar_prv_update.erl

+ 0
- 5
src/rebar_file_utils.erl 查看文件

@ -27,7 +27,6 @@
-module(rebar_file_utils).
-export([try_consult/1,
replace_home_dir/1,
format_error/1,
symlink_or_copy/2,
rm_rf/1,
@ -60,10 +59,6 @@ try_consult(File) ->
throw(?PRV_ERROR({bad_term_file, File, Reason}))
end.
replace_home_dir(Dir) ->
HomeDir = rebar_dir:home_dir(),
re:replace(Dir, [$^ | HomeDir], "~", [{return, list}]).
format_error({bad_term_file, AppFile, Reason}) ->
io_lib:format("Error reading file ~s: ~s", [AppFile, file:format_error(Reason)]).

+ 2
- 2
src/rebar_prv_update.erl 查看文件

@ -50,7 +50,7 @@ do(State) ->
{ok, Data} = file:read_file(TmpFile),
Unzipped = zlib:gunzip(Data),
ok = file:write_file(HexFile, Unzipped),
?INFO("Writing registry to ~s", [rebar_file_utils:replace_home_dir(HexFile)]),
?INFO("Writing registry to ~s", [HexFile]),
hex_to_index(State),
ok
catch
@ -95,7 +95,7 @@ hex_to_index(State) ->
end, true, Registry),
ets:insert(?PACKAGE_TABLE, {package_index_version, ?PACKAGE_INDEX_VERSION}),
?INFO("Writing index to ~s", [rebar_file_utils:replace_home_dir(PackageIndex)]),
?INFO("Writing index to ~s", [PackageIndex]),
ets:tab2file(?PACKAGE_TABLE, PackageIndex),
true
after

Loading…
取消
儲存