@@ -30,6 +30,7 @@ import normalizeFixMode from './utils/normalizeFixMode.mjs';
3030import prepareReturnValue from './prepareReturnValue.mjs' ;
3131import resolveFilePath from './utils/resolveFilePath.mjs' ;
3232import resolveOptionValue from './utils/resolveOptionValue.mjs' ;
33+ import toPath from './utils/toPath.mjs' ;
3334
3435const ALWAYS_IGNORED_GLOBS = [ '**/node_modules/**' ] ;
3536
@@ -181,7 +182,7 @@ export default async function standalone({
181182 }
182183
183184 let fileList = [ files ] . flat ( ) . map ( ( entry ) => {
184- const globCWD = ( globbyOptions && globbyOptions . cwd ) || cwd ;
185+ const globCWD = toPath ( globbyOptions ? .cwd ) || cwd ;
185186 const absolutePath = ! isAbsolute ( entry ) ? join ( globCWD , entry ) : normalize ( entry ) ;
186187
187188 if ( existsSync ( absolutePath ) ) {
@@ -208,11 +209,9 @@ export default async function standalone({
208209 absolute : true ,
209210 } ;
210211
211- const globCWD = effectiveGlobbyOptions . cwd ;
212+ const globCWD = toPath ( effectiveGlobbyOptions . cwd ) ;
212213
213- let filePaths = ( await globby ( fileList , effectiveGlobbyOptions ) ) . map ( ( entry ) =>
214- typeof entry === 'string' ? entry : entry . path ,
215- ) ;
214+ let filePaths = await globby ( fileList , effectiveGlobbyOptions ) ;
216215
217216 // Record the length of filePaths before ignore operation
218217 // Prevent prompting "No files matching the pattern 'xx' were found." when .stylelintignore ignore all input files
0 commit comments