From f75de3aa87642b3851aed7a6fce5633b1cecfa22 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Mon, 8 Oct 2018 10:50:04 +0900 Subject: [PATCH] fix: don't create new fishfile (except the first time); fix #460 --- fisher.fish | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fisher.fish b/fisher.fish index 5619703..845ea07 100644 --- a/fisher.fish +++ b/fisher.fish @@ -159,12 +159,8 @@ function _fisher_commit if test ! -e "$fishfile" command touch $fishfile echo "created empty fishfile in $fishfile" | command sed "s|$HOME|~|" >&2 - else if test -L "$fishfile" - set fishfile (command readlink $fishfile) end - _fisher_fishfile_indent (echo -s $argv\;) < $fishfile > $fishfile@ - command mv -f $fishfile@ $fishfile - command rm -f $fishfile@ + printf "%s\n" (_fisher_fishfile_indent (echo -s $argv\;) < $fishfile) > $fishfile set -l expected_pkgs (_fisher_fishfile_load < $fishfile) set -l added_pkgs (_fisher_pkg_fetch_all $expected_pkgs)