File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
modules/post/linux/manage Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def cmd_exec_vprint(cmd)
45
45
end
46
46
47
47
def exists_exe? ( exe )
48
- path = expand_path ( ENV [ ' PATH' ] )
48
+ path = expand_path ( "$ PATH" )
49
49
if path . nil? or path . empty?
50
50
return false
51
51
end
@@ -108,10 +108,10 @@ def run
108
108
return
109
109
end
110
110
111
- if datastore [ 'URL' ] . match ( / https/ )
112
- cmd_exec_vprint ( "`which #{ @http_client } ` #{ @stdout_option } #{ @ssl_option } #{ datastore [ 'URL' ] } 2>/dev/null | `which #{ @shell } ` " )
111
+ if datastore [ 'URL' ] . match ( %r{^ https://} )
112
+ cmd_exec_vprint ( "#{ @http_client } #{ @stdout_option } #{ @ssl_option } #{ datastore [ 'URL' ] } 2>/dev/null | #{ @shell } " )
113
113
else
114
- cmd_exec_vprint ( "`which #{ @http_client } ` #{ @stdout_option } #{ datastore [ 'URL' ] } 2>/dev/null | `which #{ @shell } ` " )
114
+ cmd_exec_vprint ( "#{ @http_client } #{ @stdout_option } #{ datastore [ 'URL' ] } 2>/dev/null | #{ @shell } " )
115
115
end
116
116
end
117
117
You can’t perform that action at this time.
0 commit comments