We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0cfd3a commit 3332d86Copy full SHA for 3332d86
1 file changed
lib/github/auth/cli.rb
@@ -11,7 +11,7 @@ def initialize(argv)
11
end
12
13
def execute
14
- if COMMANDS.include?(command) && !usernames.empty?
+ if COMMANDS.include?(command)
15
send command
16
elsif command == '--version'
17
print_version
@@ -23,11 +23,21 @@ def execute
23
private
24
25
def add
26
+ if usernames.empty?
27
+ print_usage
28
+ return
29
+ end
30
+
31
on_keys_file :write!,
32
"Adding #{keys.count} key(s) to '#{keys_file.path}'"
33
34
35
def remove
36
37
38
39
40
41
on_keys_file :delete!,
42
"Removing #{keys.count} key(s) from '#{keys_file.path}'"
43
0 commit comments