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:
parent
55991a0b3b
commit
783f28762f
@ -1,5 +1,7 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
|
- Ability to run `fablab:chain:all` non interactively
|
||||||
|
|
||||||
## v5.0.7 2021 June 24
|
## v5.0.7 2021 June 24
|
||||||
|
|
||||||
- Fix a bug: unable to export members list if no subscriptions was taken
|
- Fix a bug: unable to export members list if no subscriptions was taken
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
namespace :fablab do
|
namespace :fablab do
|
||||||
namespace :chain do
|
namespace :chain do
|
||||||
desc 'assign all footprints to existing records'
|
desc 'assign all footprints to existing records'
|
||||||
task all: :environment do
|
task :all, [:force] => :environment do |_task, args|
|
||||||
if Invoice.where.not(footprint: nil).count.positive?
|
if Invoice.where.not(footprint: nil).count.positive? && args.force != 'force'
|
||||||
print 'All footprints will be regenerated. Are you sure? (y/n) '
|
print 'All footprints will be regenerated. Are you sure? (y/n) '
|
||||||
confirm = STDIN.gets.chomp
|
confirm = STDIN.gets.chomp
|
||||||
next unless confirm == 'y'
|
next unless confirm == 'y'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user