mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use single quotes when shelling out to ag.
This prevents `sh` from interpreting $ and \ as special characters.
This commit is contained in:
@@ -162,8 +162,7 @@ class Project
|
||||
_.remove(@buffers, buffer)
|
||||
|
||||
scan: (regex, iterator) ->
|
||||
escapedRegex = regex.source.replace("\\", "\\\\")
|
||||
command = "#{require.resolve('ag')} --ackmate \"#{escapedRegex}\" \"#{@getPath()}\""
|
||||
command = "#{require.resolve('ag')} --ackmate '#{regex.source}' '#{@getPath()}'"
|
||||
bufferedData = ""
|
||||
|
||||
state = 'readingPath'
|
||||
|
||||
Reference in New Issue
Block a user