File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function M.find_files(start_dir, file_name)
1212
1313 -- Create the find command with appropriate flags for recursive searching
1414 local find_command
15- if package.config : sub (1 , 1 ) == " \\ " then -- Windows
15+ if string. sub (package.config , 1 , 1 ) == " \\ " then -- Windows
1616 find_command = string.format (' powershell.exe -Command "Get-ChildItem -Path \\ "%s\\ " -Recurse -Filter \\ "%s\\ " -File -Exclude \\ ".git\\ " -ErrorAction SilentlyContinue"' , start_dir , file_name )
1717 else -- UNIX-like systems
1818 find_command = string.format (' find "%s" -type d -name ".git" -prune -o -type f -name "%s" -print 2>/dev/null' , start_dir , file_name )
135135function M .os_path (path )
136136 if path == nil then return nil end
137137 -- Get the platform-specific path separator
138- local separator = package.config : sub (1 , 1 )
138+ local separator = string. sub (package.config , 1 , 1 )
139139 return string.gsub (path , ' [/\\ ]' , separator )
140140end
141141
You can’t perform that action at this time.
0 commit comments