summaryrefslogtreecommitdiffstatshomepage
path: root/node_modules/@actions/exec/lib/toolrunner.js
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-02-28 22:23:19 +0100
committerEgor Tensin <egor@tensin.name>2026-02-28 22:28:23 +0100
commitcf0901d753db0bf4d15baf625a6fa537978b03a9 (patch)
tree41ae5e7f9eacdc67b9fa980596c803b9c50ca188 /node_modules/@actions/exec/lib/toolrunner.js
parentupgrade actions/core to version 2 (diff)
downloadcleanup-path-cf0901d753db0bf4d15baf625a6fa537978b03a9.tar.gz
cleanup-path-cf0901d753db0bf4d15baf625a6fa537978b03a9.zip
upgrade actions/core to version 3v4.0.3v4
The relevant changes are in clean.js/restore.js. I'm very, very far away from the entire Javascript infrastructure, and absolutely don't understand why this changes were necessary. Thanks, ChatGPT! Supposedly, this has something to do with the actions/core's transition to ESM or whatever.
Diffstat (limited to 'node_modules/@actions/exec/lib/toolrunner.js')
-rw-r--r--node_modules/@actions/exec/lib/toolrunner.js58
1 files changed, 10 insertions, 48 deletions
diff --git a/node_modules/@actions/exec/lib/toolrunner.js b/node_modules/@actions/exec/lib/toolrunner.js
index 3a14af9..e0c3c00 100644
--- a/node_modules/@actions/exec/lib/toolrunner.js
+++ b/node_modules/@actions/exec/lib/toolrunner.js
@@ -1,37 +1,3 @@
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
@@ -41,22 +7,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.ToolRunner = void 0;
-exports.argStringToArray = argStringToArray;
-const os = __importStar(require("os"));
-const events = __importStar(require("events"));
-const child = __importStar(require("child_process"));
-const path = __importStar(require("path"));
-const io = __importStar(require("@actions/io"));
-const ioUtil = __importStar(require("@actions/io/lib/io-util"));
-const timers_1 = require("timers");
+import * as os from 'os';
+import * as events from 'events';
+import * as child from 'child_process';
+import * as path from 'path';
+import * as io from '@actions/io';
+import * as ioUtil from '@actions/io/lib/io-util';
+import { setTimeout } from 'timers';
/* eslint-disable @typescript-eslint/unbound-method */
const IS_WINDOWS = process.platform === 'win32';
/*
* Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.
*/
-class ToolRunner extends events.EventEmitter {
+export class ToolRunner extends events.EventEmitter {
constructor(toolPath, args, options) {
super();
if (!toolPath) {
@@ -502,14 +465,13 @@ class ToolRunner extends events.EventEmitter {
});
}
}
-exports.ToolRunner = ToolRunner;
/**
* Convert an arg string to an array of args. Handles escaping
*
* @param argString string of arguments
* @returns string[] array of arguments
*/
-function argStringToArray(argString) {
+export function argStringToArray(argString) {
const args = [];
let inQuotes = false;
let escaped = false;
@@ -583,7 +545,7 @@ class ExecState extends events.EventEmitter {
this._setResult();
}
else if (this.processExited) {
- this.timeout = (0, timers_1.setTimeout)(ExecState.HandleTimeout, this.delay, this);
+ this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this);
}
}
_debug(message) {