1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

run non interactively

This commit is contained in:
Sylvain 2021-06-28 08:38:48 +02:00
parent 55991a0b3b
commit 783f28762f
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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'