diff options
| author | Egor Tensin <egor@tensin.name> | 2026-02-28 22:23:19 +0100 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-02-28 22:28:23 +0100 |
| commit | cf0901d753db0bf4d15baf625a6fa537978b03a9 (patch) | |
| tree | 41ae5e7f9eacdc67b9fa980596c803b9c50ca188 /node_modules/@actions/exec/lib/exec.js | |
| parent | upgrade actions/core to version 2 (diff) | |
| download | cleanup-path-cf0901d753db0bf4d15baf625a6fa537978b03a9.tar.gz cleanup-path-cf0901d753db0bf4d15baf625a6fa537978b03a9.zip | |
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/exec.js')
| -rw-r--r-- | node_modules/@actions/exec/lib/exec.js | 49 |
1 files changed, 6 insertions, 43 deletions
diff --git a/node_modules/@actions/exec/lib/exec.js b/node_modules/@actions/exec/lib/exec.js index 524a59c..98fe217 100644 --- a/node_modules/@actions/exec/lib/exec.js +++ b/node_modules/@actions/exec/lib/exec.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,11 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.exec = exec; -exports.getExecOutput = getExecOutput; -const string_decoder_1 = require("string_decoder"); -const tr = __importStar(require("./toolrunner")); +import { StringDecoder } from 'string_decoder'; +import * as tr from './toolrunner.js'; /** * Exec a command. * Output will be streamed to the live console. @@ -56,7 +19,7 @@ const tr = __importStar(require("./toolrunner")); * @param options optional exec options. See ExecOptions * @returns Promise<number> exit code */ -function exec(commandLine, args, options) { +export function exec(commandLine, args, options) { return __awaiter(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { @@ -79,14 +42,14 @@ function exec(commandLine, args, options) { * @param options optional exec options. See ExecOptions * @returns Promise<ExecOutput> exit code, stdout, and stderr */ -function getExecOutput(commandLine, args, options) { +export function getExecOutput(commandLine, args, options) { return __awaiter(this, void 0, void 0, function* () { var _a, _b; let stdout = ''; let stderr = ''; //Using string decoder covers the case where a mult-byte character is split - const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); - const stderrDecoder = new string_decoder_1.StringDecoder('utf8'); + const stdoutDecoder = new StringDecoder('utf8'); + const stderrDecoder = new StringDecoder('utf8'); const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; const stdErrListener = (data) => { |
