Skip to content

Commit bc49dda

Browse files
committed
Merge branch 'master' into v1.1
2 parents 9f3e54c + a9ee604 commit bc49dda

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

analyze.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function prepareInputsZip(inputsGlob, targetFile) {
6565
for await (const file of inputFilesGlob.globGenerator()) {
6666
const relPath = makeRelative(workingDir, file)
6767
if (file == targetFile || relPath == targetFile) continue
68-
68+
6969
archive.file(relPath)
7070
numWritten += 1
7171
}

dist/index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function areGlobsValid(globsArray) {
3838
}
3939

4040
function buildGlobObject(globsArray) {
41-
return glob.create(globsArray.join('\n'))
41+
return glob.create(globsArray.join('\n'), { matchDirectories: false })
4242
}
4343

4444
function makeRelative(workingDir, path) {
@@ -62,15 +62,18 @@ async function prepareInputsZip(inputsGlob, targetFile) {
6262
const output = fs.createWriteStream(targetFile);
6363
const archive = archiver('zip');
6464
archive.on('end', () => core.info("Finished writing ZIP"))
65-
archive.on('warning', (err) => core.warning("Warning when writing ZIP: ", err))
66-
archive.on('error', (err) => core.error("Error when writing ZIP: ", err))
65+
archive.on('warning', (err) => core.warning("Warning when writing ZIP: " + err))
66+
archive.on('error', (err) => core.error("Error when writing ZIP: " + err))
6767

6868
archive.pipe(output);
6969

7070
let numWritten = 0
7171
const workingDir = process.cwd()
7272
for await (const file of inputFilesGlob.globGenerator()) {
73-
archive.file(makeRelative(workingDir, file))
73+
const relPath = makeRelative(workingDir, file)
74+
if (file == targetFile || relPath == targetFile) continue
75+
76+
archive.file(relPath)
7477
numWritten += 1
7578
}
7679
await archive.finalize()

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)