use temporary file as workaround for calling fpm with arguments

This commit is contained in:
David Hiendl 2024-01-19 15:07:26 +01:00
parent 7fd6076c38
commit 7ff88d52d0

11
dist/index.js vendored
View File

@ -30192,6 +30192,9 @@ __webpack_async_result__();
/* harmony export */ });
/* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(2186);
/* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(_actions_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(7147);
/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nccwpck_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);
const exec = __nccwpck_require__(1514);
@ -30214,19 +30217,17 @@ async function installFpmViaRuby(debug) {
async function executeFpmBuild(computedFpmArgs, debug) {
const userFpmArgs = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput('fpm_args');
let fpmCmd = 'fpm'
const fpmCmd = 'fpm'
+ ' ' + computedFpmArgs
+ ' ' + userFpmArgs;
fpmCmd = fpmCmd.replaceAll('\n', ' ')
.replaceAll('\\n', ' ')
.replaceAll('\\', ' ');
fs__WEBPACK_IMPORTED_MODULE_1___default().writeFileSync("/tmp/action-fpm-command-bash", fpmCmd);
if (debug) {
console.log('fpm command: ', fpmCmd);
}
await exec.exec(fpmCmd);
await exec.exec("bash /tmp/action-fpm-command-bash");
}
function isNonEmptyStr(str) {