Re-doing bundling...
This commit is contained in:
Vendored
+11
-11
@@ -3762,9 +3762,7 @@ var __webpack_exports__ = {};
|
||||
function main() {
|
||||
const converter = new ansi_to_html__WEBPACK_IMPORTED_MODULE_0__();
|
||||
const input = _actions_core__WEBPACK_IMPORTED_MODULE_1__.getInput("input", { required: false });
|
||||
const encoding = _actions_core__WEBPACK_IMPORTED_MODULE_1__.getInput("encoding", {
|
||||
required: true,
|
||||
});
|
||||
const encoding = _actions_core__WEBPACK_IMPORTED_MODULE_1__.getInput("encoding", { required: true });
|
||||
const path = _actions_core__WEBPACK_IMPORTED_MODULE_1__.getInput("path", { required: false });
|
||||
|
||||
if (!input && !path) {
|
||||
@@ -3772,24 +3770,26 @@ function main() {
|
||||
}
|
||||
|
||||
if (input && path) {
|
||||
return _actions_core__WEBPACK_IMPORTED_MODULE_1__.setFailed(
|
||||
"You must provide either an input or path, not both."
|
||||
);
|
||||
return _actions_core__WEBPACK_IMPORTED_MODULE_1__.setFailed("You must provide either an input or path, not both.");
|
||||
}
|
||||
|
||||
if (input && input !== "") {
|
||||
if (input) {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_1__.setOutput("contents", converter.toHtml(input));
|
||||
} else if (path && path !== "") {
|
||||
} else {
|
||||
if (!fs__WEBPACK_IMPORTED_MODULE_2__.existsSync(path)) {
|
||||
return _actions_core__WEBPACK_IMPORTED_MODULE_1__.setFailed(`Path ${path} does not exist.`);
|
||||
}
|
||||
|
||||
const rawContents = fs__WEBPACK_IMPORTED_MODULE_2__.readFileSync(path).toString(encoding);
|
||||
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_1__.setOutput("contents", converter.toHtml(rawContents));
|
||||
const raw = fs__WEBPACK_IMPORTED_MODULE_2__.readFileSync(path).toString(encoding);
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_1__.setOutput("contents", converter.toHtml(raw));
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
main();
|
||||
} catch (err) {
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_1__.setFailed(err.message);
|
||||
}
|
||||
})();
|
||||
|
||||
var __webpack_exports__main = __webpack_exports__.D;
|
||||
|
||||
Reference in New Issue
Block a user