Describe the enhancement
When extracting to a path that does not yet exist, the error message given, when using the methods in the title, provides a ENOENT error code and specifically identifies the location of the tool as the source of the issue.
Originally mentioned in issue #82
Code Snippet
Unfortunately this is a modification of the bundled output, but you get the idea:
function extractZipNix(file, dest) {
return __awaiter(this, void 0, void 0, function* () {
if(!fs.existsSync(dest)) { throw new Error('The destination path for extraction does not exist.'); }
const unzipPath = yield io.which('unzip');
yield exec_1.exec(`"${unzipPath}"`, [file], { cwd: dest });
});
}