mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
run non interactively
This commit is contained in:
parent
55991a0b3b
commit
783f28762f
@ -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
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user