Module: Redmine::Utils::Shell
- Included in:
- Scm::Adapters::AbstractAdapter, Thumbnail
- Defined in:
- lib/redmine/utils/shell.rb
Class Method Summary collapse
Class Method Details
permalink .shell_quote(str) ⇒ Object
[View source] [View on GitHub]
25 26 27 28 29 30 31 |
# File 'lib/redmine/utils/shell.rb', line 25 def shell_quote(str) if Redmine::Platform.mswin? '"' + str.gsub(/"/, '\\"') + '"' else "'" + str.gsub(/'/, "'\"'\"'") + "'" end end |
permalink .shell_quote_command(command) ⇒ Object
[View source] [View on GitHub]
33 34 35 36 37 38 39 |
# File 'lib/redmine/utils/shell.rb', line 33 def shell_quote_command(command) if Redmine::Platform.mswin? && RUBY_PLATFORM == 'java' command else shell_quote(command) end end |