@emarketeer/ts-microservice-commons 6.7.1 → 6.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/em-commons.js +7 -5
- package/package.json +1 -1
package/dist/lib/em-commons.js
CHANGED
|
@@ -3041,13 +3041,15 @@ var cleanup = function () {
|
|
|
3041
3041
|
fs.unlinkSync('./generated.serverless.yml');
|
|
3042
3042
|
}
|
|
3043
3043
|
};
|
|
3044
|
+
var escapeShellArg = function (arg) {
|
|
3045
|
+
return "'" + arg.replace(/'/g, "'\\''") + "'";
|
|
3046
|
+
};
|
|
3044
3047
|
var runCommand = function (command, additionalArgs) {
|
|
3045
3048
|
if (additionalArgs === void 0) { additionalArgs = []; }
|
|
3046
|
-
var
|
|
3047
|
-
var
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
return crossSpawn.sync(program, args, { stdio: 'inherit' });
|
|
3049
|
+
var escapedArgs = additionalArgs.map(escapeShellArg).join(' ');
|
|
3050
|
+
var fullCommand = additionalArgs.length > 0 ? command + ' ' + escapedArgs : command;
|
|
3051
|
+
console.log('running ', fullCommand);
|
|
3052
|
+
return crossSpawn.sync(fullCommand, [], { stdio: 'inherit', shell: true });
|
|
3051
3053
|
};
|
|
3052
3054
|
|
|
3053
3055
|
process.on('unhandledRejection', function (err) {
|