]> cat aescling's git repositories - mastodon.git/commitdiff
Handle if username is not found on tootctl feeds build (#9040)
authorJeong Arm <kjwonmail@gmail.com>
Sun, 21 Oct 2018 14:42:22 +0000 (23:42 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 21 Oct 2018 14:42:22 +0000 (16:42 +0200)
lib/mastodon/feeds_cli.rb

index c3fca723ecf6e631bc69989202b579500add649c..cca65cf87817778db89abbf6b5591f6eb1f58165 100644 (file)
@@ -54,6 +54,11 @@ module Mastodon
       elsif username.present?
         account = Account.find_local(username)
 
+        if account.nil?
+          say("Account #{username} is not found", :red)
+          exit(1)
+        end
+
         if options[:background]
           RegenerationWorker.perform_async(account.id) unless options[:dry_run]
         else