use temporary file as workaround for calling fpm with arguments
This commit is contained in:
parent
90bbf0c643
commit
7fd6076c38
@ -1,4 +1,5 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
import fs from 'fs';
|
||||||
|
|
||||||
const exec = require('@actions/exec');
|
const exec = require('@actions/exec');
|
||||||
|
|
||||||
@ -20,19 +21,17 @@ export async function installFpmViaRuby(debug) {
|
|||||||
export async function executeFpmBuild(computedFpmArgs, debug) {
|
export async function executeFpmBuild(computedFpmArgs, debug) {
|
||||||
|
|
||||||
const userFpmArgs = core.getInput('fpm_args');
|
const userFpmArgs = core.getInput('fpm_args');
|
||||||
let fpmCmd = 'fpm'
|
const fpmCmd = 'fpm'
|
||||||
+ ' ' + computedFpmArgs
|
+ ' ' + computedFpmArgs
|
||||||
+ ' ' + userFpmArgs;
|
+ ' ' + userFpmArgs;
|
||||||
|
|
||||||
fpmCmd = fpmCmd.replaceAll('\n', ' ')
|
fs.writeFileSync("/tmp/action-fpm-command-bash", fpmCmd);
|
||||||
.replaceAll('\\n', ' ')
|
|
||||||
.replaceAll('\\', ' ');
|
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
console.log('fpm command: ', fpmCmd);
|
console.log('fpm command: ', fpmCmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
await exec.exec(fpmCmd);
|
await exec.exec("bash /tmp/action-fpm-command-bash");
|
||||||
}
|
}
|
||||||
|
|
||||||
function isNonEmptyStr(str) {
|
function isNonEmptyStr(str) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user