diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a3df5c60..16f139073 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager +- Ability to run `fablab:chain:all` non interactively + ## v5.0.7 2021 June 24 - Fix a bug: unable to export members list if no subscriptions was taken diff --git a/lib/tasks/fablab/chain.rake b/lib/tasks/fablab/chain.rake index 43bc22bd4..324ae3fe4 100644 --- a/lib/tasks/fablab/chain.rake +++ b/lib/tasks/fablab/chain.rake @@ -3,8 +3,8 @@ namespace :fablab do namespace :chain do desc 'assign all footprints to existing records' - task all: :environment do - if Invoice.where.not(footprint: nil).count.positive? + task :all, [:force] => :environment do |_task, args| + if Invoice.where.not(footprint: nil).count.positive? && args.force != 'force' print 'All footprints will be regenerated. Are you sure? (y/n) ' confirm = STDIN.gets.chomp next unless confirm == 'y'