3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-17 13:47:20 +00:00

fix: bug not using the path for source file inputs (#1179)

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Tonye Jack 2023-05-26 08:20:56 -06:00 committed by GitHub
parent e82d3911ce
commit c798a4ea57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 2 deletions

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

View file

@ -94,7 +94,8 @@ export async function run(): Promise<void> {
)
const filePatterns = await getFilePatterns({
inputs
inputs,
workingDirectory
})
const addedFiles = await getDiffFiles({

View file

@ -676,9 +676,11 @@ export const jsonOutput = ({
}
export const getFilePatterns = async ({
inputs
inputs,
workingDirectory
}: {
inputs: Inputs
workingDirectory: string
}): Promise<string[]> => {
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}`