diff --git a/src/utils/funcignore.ts b/src/utils/funcignore.ts index ab362468b..d3192ef27 100644 --- a/src/utils/funcignore.ts +++ b/src/utils/funcignore.ts @@ -35,7 +35,7 @@ export class FuncIgnore { const allFiles: string[] = glob.sync(`${sanitizedWorkingDir}/**/*`, { dot: true }); allFiles.forEach(name => { - const filename = name.replace(`${working_dir}\\`, ''); + const filename = name.replace(`${working_dir}/`, ''); Logger.Warn(`filename ==> ${filename}`); if (ignoreParser.ignores(filename)) { diff --git a/tests/handlers/contentPreparer.spec.ts b/tests/handlers/contentPreparer.spec.ts index af0a53a79..facb42520 100644 --- a/tests/handlers/contentPreparer.spec.ts +++ b/tests/handlers/contentPreparer.spec.ts @@ -114,7 +114,7 @@ describe('Check ContentPreparer', function () { it('should remove unnecessary files according to .funcignore', async function() { const preparer = new ContentPreparer(); - const folderPath = `${_rootPath}\\tests\\samples\\PythonAppFuncignoreFolder`; + const folderPath = `${_rootPath}/tests/samples/PythonAppFuncignoreFolder`; process.env.RUNNER_TEMP = `${_rootPath}/tests/temp`; const params = Builder.GetDefaultActionParameters();