Skip to content

Commit

Permalink
feat: update deps (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris authored Dec 14, 2019
1 parent 89c2b1f commit a151309
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 22 deletions.
13 changes: 13 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
const os = __webpack_require__(87);
const events = __webpack_require__(614);
const child = __webpack_require__(129);
const path = __webpack_require__(622);
const io = __webpack_require__(1);
const ioUtil = __webpack_require__(672);
/* eslint-disable @typescript-eslint/unbound-method */
const IS_WINDOWS = process.platform === 'win32';
/*
Expand Down Expand Up @@ -703,6 +706,16 @@ class ToolRunner extends events.EventEmitter {
*/
exec() {
return __awaiter(this, void 0, void 0, function* () {
// root the tool path if it is unrooted and contains relative pathing
if (!ioUtil.isRooted(this.toolPath) &&
(this.toolPath.includes('/') ||
(IS_WINDOWS && this.toolPath.includes('\\')))) {
// prefer options.cwd if it is specified, however options.cwd may also need to be rooted
this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
}
// if the tool is only a file name, then resolve it from the PATH
// otherwise verify it exists (add extension on Windows if necessary)
this.toolPath = yield io.which(this.toolPath, true);
return new Promise((resolve, reject) => {
this._debug(`exec tool: ${this.toolPath}`);
this._debug('arguments:');
Expand Down
41 changes: 22 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
"homepage": "https://github.com/peaceiris/actions-mdbook#readme",
"dependencies": {
"@actions/core": "^1.2.0",
"@actions/exec": "^1.0.1",
"@actions/exec": "^1.0.2",
"@actions/io": "^1.0.1",
"@actions/tool-cache": "^1.1.2",
"xmlhttprequest": "^1.8.0"
},
"devDependencies": {
"@types/jest": "^24.0.23",
"@types/node": "^12.12.14",
"@typescript-eslint/parser": "^2.10.0",
"@types/node": "^12.12.17",
"@typescript-eslint/parser": "^2.11.0",
"@zeit/ncc": "^0.20.5",
"eslint": "^6.7.2",
"husky": "^3.1.0",
Expand Down

0 comments on commit a151309

Please sign in to comment.