Method: Nugrant::Helper::Env::Exporter.export_command
- Defined in:
- lib/nugrant/helper/env/exporter.rb
permalink .export_command(key, value, options = {}) ⇒ Object
Returns a string representation of the command that needs to be used on the current platform to export an environment variable.
Options:
* :escape_value (true) => If true, escape the value to export.
170 171 172 173 174 175 176 |
# File 'lib/nugrant/helper/env/exporter.rb', line 170 def self.export_command(key, value, = {}) value = value.to_s() value = Shellwords.escape(value) if [:escape_value] == nil || [:escape_value] # TODO: Handle platform differently "export #{key}=#{value}" end |