@@ -102,14 +102,12 @@ def validate
102102 valid = errors . none?
103103
104104 if valid
105- app_package . warnings . each { |w | say w . to_s , :yellow }
105+ app_package . warnings . each { |w | say_status 'warning' , w . to_s , :yellow }
106106 # clean when all apps are upgraded
107107 run_deprecation_checks unless options [ :'unattended' ]
108108 say_status 'validate' , 'OK'
109109 else
110- errors . each do |e |
111- say_status 'validate' , e . to_s , :red
112- end
110+ errors . each { |e | say_status 'validate' , e . to_s , :red }
113111 end
114112
115113 @destination_stack . pop if options [ :path ]
@@ -124,7 +122,10 @@ def package
124122
125123 setup_path ( options [ :path ] )
126124
127- say_status 'warning' , 'Please note that the name key of manifest.json is currently only used in development.' , :yellow if app_package . manifest . name
125+ if app_package . manifest . name
126+ warning = 'Please note that the name key of manifest.json is currently only used in development.'
127+ say_status 'warning' , warning , :yellow
128+ end
128129
129130 archive_path = File . join ( tmp_dir , "app-#{ Time . now . strftime ( '%Y%m%d%H%M%S' ) } .zip" )
130131
@@ -162,7 +163,8 @@ def clean
162163 def server
163164 setup_path ( options [ :path ] )
164165 if app_package . has_file? ( 'assets/app.js' )
165- say 'Warning: creating assets/app.js causes zat server to behave badly.' , :yellow
166+ warning = 'Warning: creating assets/app.js causes zat server to behave badly.'
167+ say_status 'warning' , warning , :yellow
166168 end
167169
168170 require 'zendesk_apps_tools/server'
0 commit comments