lib/buildbox/cli.rb in buildbox-0.6 vs lib/buildbox/cli.rb in buildbox-0.6.1

- old
+ new

@@ -57,11 +57,11 @@ puts "No token provided" exit 1 end access_token = @argv.first - agent_access_tokens = Buildbox.config.agent_access_tokens - Buildbox.config.update(:agent_access_tokens => agent_access_tokens << access_token) + new_access_tokens = Buildbox.config.agent_access_tokens + [access_token] + Buildbox.config.update(:agent_access_tokens => agent_access_tokens.uniq) puts "Successfully added agent access token" puts "You can now start the agent with: buildbox agent:start." puts "If the agent is already running, you'll have to restart it for the new changes to take effect" end