spaceship/lib/spaceship/spaceauth_runner.rb in fastlane-2.114.0.beta.20190108200048 vs spaceship/lib/spaceship/spaceauth_runner.rb in fastlane-2.114.0.beta.20190109200053
- old
+ new
@@ -55,8 +55,18 @@
puts(yaml.cyan.underline)
puts("")
puts("")
puts("Example:")
puts("export FASTLANE_SESSION='#{yaml}'".cyan.underline)
+
+ if mac? && Spaceship::Client::UserInterface.interactive? && agree("🙄 Should fastlane copy the cookie into your clipboard, so you can easily paste it? (y/n)", true)
+ require 'open3'
+ Open3.popen3('pbcopy') { |input, _, _| input << yaml }
+ puts("Successfully copied text into your clipboard 🎨".green)
+ end
+ end
+
+ def mac?
+ (/darwin/ =~ RUBY_PLATFORM) != nil
end
end
end