blob: bb9187db37b3041d3dbaacc3aa506962c76f38fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
require "shellwords"
module SystemCommandCompatibilityLayer
def initialize(executable, args: [], **options)
if args.empty? && !File.exist?(executable)
odeprecated "`system_command` with a shell string", "`system_command` with the `args` parameter"
executable, *args = Shellwords.shellsplit(executable)
end
super(executable, args: args, **options)
end
end
module Hbc
class SystemCommand
prepend SystemCommandCompatibilityLayer
end
end
|