workflow_launcher/node_modules/extract-zip/cli.js
2024-03-11 16:01:07 +01:00

20 lines
393 B
JavaScript
Executable File

#!/usr/bin/env node
/* eslint-disable no-process-exit */
var extract = require('./')
var args = process.argv.slice(2)
var source = args[0]
var dest = args[1] || process.cwd()
if (!source) {
console.error('Usage: extract-zip foo.zip <targetDirectory>')
process.exit(1)
}
extract(source, { dir: dest })
.catch(function (err) {
console.error('error!', err)
process.exit(1)
})