Skip to content

Commit

Permalink
Merge pull request #755 from tsloughter/master
Browse files Browse the repository at this point in the history
remove replacement of home dir with ~ in update output
  • Loading branch information
ferd committed Aug 27, 2015
2 parents 08e07d6 + 00a4a44 commit a1b1fd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/rebar_file_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)]).

Expand Down
4 changes: 2 additions & 2 deletions src/rebar_prv_update.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a1b1fd0

Please sign in to comment.