Skip to content

Commit

Permalink
Fix incorrect file listing for add/remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémi Durieu committed Nov 4, 2020
1 parent e5ed7f6 commit b778cc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/cmd/add.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Add
# files - The String file names to add in the local repository.
def initialize(*files)
@mt = MasterTree.new(Config.master_tree_path, Dir.home)
@files = files
@files = files.flatten
end

def perform
Expand Down
2 changes: 1 addition & 1 deletion lib/cmd/remove.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Remove
# files - The String file names to remove from the local repository.
def initialize(*files)
@mt = MasterTree.new(Config.master_tree_path, Dir.home)
@files = Config.options[:remove_all] ? @mt.list : files
@files = Config.options[:remove_all] ? @mt.list : files.flatten
end

def perform
Expand Down

0 comments on commit b778cc3

Please sign in to comment.