From cc5f2d19c687bdde42ea02539382394f1ba8926f Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Fri, 4 Dec 2020 00:05:51 +0100 Subject: [PATCH] Fix argv split --- index.js | 3 ++- package-lock.json | 5 +++++ package.json | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 4acf2bc..7401e9e 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ const core = require('@actions/core') const fs = require('fs') const execa = require('execa') +const split = require('argv-split') void function main() { try { @@ -45,5 +46,5 @@ function dep() { dep = 'deployer.phar' } - execa.commandSync(`${dep} ${core.getInput('dep')}`) + execa.sync(dep, split(core.getInput('dep'))) } diff --git a/package-lock.json b/package-lock.json index aa31062..af16678 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,11 @@ "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==" }, + "argv-split": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argv-split/-/argv-split-2.0.1.tgz", + "integrity": "sha1-viZBF3kNvVzNY+w/RJoYBIFKxMU=" + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", diff --git a/package.json b/package.json index 5fe7162..b7914db 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "private": true, "dependencies": { "@actions/core": "^1.2.6", + "argv-split": "^2.0.1", "execa": "^4.1.0" } }