From c798a4ea57f0e0a9d2b5374853c9c479ebb435a2 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Fri, 26 May 2023 08:20:56 -0600 Subject: [PATCH] fix: bug not using the path for source file inputs (#1179) Co-authored-by: GitHub Action --- dist/index.js | Bin 317473 -> 317629 bytes dist/index.js.map | Bin 372949 -> 373123 bytes src/main.ts | 3 ++- src/utils.ts | 6 +++++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 701bc0324b54ee3187bda680192cb3ec0fec0287..13374124be7af4cad89d9cb2da1381f550a934ae 100644 GIT binary patch delta 100 zcmZ3uL3r;*;SGyBC(BKgoBY9ubMmQW!khPZN|jBnqa^fYEh@yYYK pWta*yCl~gJZ!chEVqz5A{)Un96Em1=!_Fu> c9mwUIev6G!q&<_35r~<9n0b398%xL~00_<<2><{9 diff --git a/dist/index.js.map b/dist/index.js.map index ab76fb5e5827288a8a799d7bcc98d0a35219a556..498f5cfa2fb33b05f2997d98a111a05591668858 100644 GIT binary patch delta 145 zcmccmP^|f}*al_Mi2^GCnt% z&KJojKRMt(*Ywx37=^e02xFA4oUDCYX!7+}j@v^nFnTgh-*TBzVsiF%8Kwfw>4NEu j64R?MF^X+Jb&-*W1w*d=?Nvq~W&&d7?QgHLytoAb8Sy>7 delta 120 zcmZpEEOzyw*al_M$rl!KFT$;h%@{}Q7d3!FRs!xcu(=?AVe3bgOI#t6hr NK+L>-$2FGIw*V%DF&h8? diff --git a/src/main.ts b/src/main.ts index 738d37cf..bae37ad9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -94,7 +94,8 @@ export async function run(): Promise { ) const filePatterns = await getFilePatterns({ - inputs + inputs, + workingDirectory }) const addedFiles = await getDiffFiles({ diff --git a/src/utils.ts b/src/utils.ts index 522edbb9..b391ea75 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -676,9 +676,11 @@ export const jsonOutput = ({ } export const getFilePatterns = async ({ - inputs + inputs, + workingDirectory }: { inputs: Inputs + workingDirectory: string }): Promise => { let filePatterns = inputs.files .split(inputs.filesSeparator) @@ -689,6 +691,7 @@ export const getFilePatterns = async ({ const inputFilesFromSourceFile = inputs.filesFromSourceFile .split(inputs.filesFromSourceFileSeparator) .filter(p => p !== '') + .map(p => path.join(workingDirectory, p)) core.debug(`files from source file: ${inputFilesFromSourceFile}`) @@ -722,6 +725,7 @@ export const getFilePatterns = async ({ const inputFilesIgnoreFromSourceFile = inputs.filesIgnoreFromSourceFile .split(inputs.filesIgnoreFromSourceFileSeparator) .filter(p => p !== '') + .map(p => path.join(workingDirectory, p)) core.debug( `files ignore from source file: ${inputFilesIgnoreFromSourceFile}`