dotnet / corefx-tools

Place to include various misc tools for .NET and .NET Core.
MIT License
58 stars 41 forks source link

Add missing directory in the find command argument #82

Closed jeremymeng closed 5 years ago

jeremymeng commented 6 years ago

@brianrob

In addition, another issue is when I use the perfcollect view command on another machine different from the collecting machine, find $currentDir -name *.map gives an error like below

find: paths must precede expression: perfinfo-934.map
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec|time] [path...] [expression]

However, the line that finds *.debuginfo worked fine.

It seems that there are two *.maps files under the folder and the shell expanded *.map into file names and passed them to the find program. Wrapping *.maps with quotes made it work, but I wonder whether there are any concerns about this change:

local mapFiles=`find $currentDir -name "*.map"`