Skip to content

Commit

Permalink
main: use join from path lib
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidd6 committed Jun 16, 2020
1 parent 81490e4 commit 642b58e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const core = require('@actions/core')
const github = require('@actions/github')
const AdmZip = require('adm-zip')
const filesize = require('filesize')
const pathname = require('path')

async function main() {
try {
Expand Down Expand Up @@ -83,7 +84,8 @@ async function main() {
const adm = new AdmZip(Buffer.from(zip.data))
adm.getEntries().forEach((entry) => {
const action = entry.isDirectory ? "creating" : "inflating"
console.log(` ${action}: ${path}/${entry.entryName}`)
const filepath = pathname.join(path, entry.entryName)
console.log(` ${action}: ${filepath}`)
})
adm.extractAllTo(path, true)
} catch (error) {
Expand Down

0 comments on commit 642b58e

Please sign in to comment.