fastlane/lib/fastlane/actions/clipboard.rb in fastlane_hotfix-2.165.1 vs fastlane/lib/fastlane/actions/clipboard.rb in fastlane_hotfix-2.187.0
- old
+ new
@@ -5,14 +5,11 @@
value = params[:value]
truncated_value = value[0..800].gsub(/\s\w+\s*$/, '...')
UI.message("Storing '#{truncated_value}' in the clipboard 🎨")
- if FastlaneCore::Helper.mac?
- require 'open3'
- Open3.popen3('pbcopy') { |input, _, _| input << value }
- end
+ FastlaneCore::Clipboard.copy(content: value)
end
#####################################################
# @!group Documentation
#####################################################
@@ -28,14 +25,14 @@
description: "The string that should be copied into the clipboard")
]
end
def self.authors
- ["KrauseFx", "joshdholtz"]
+ ["KrauseFx", "joshdholtz", "rogerluan"]
end
def self.is_supported?(platform)
- true
+ FastlaneCore::Clipboard.is_supported?
end
def self.example_code
[
'clipboard(value: "https://docs.fastlane.tools/")',