escover 6.5.0 → 6.5.1
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/ChangeLog +5 -0
- package/lib/cli/cli.js +5 -11
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/lib/cli/cli.js
CHANGED
|
@@ -67,17 +67,11 @@ export const cli = async ({argv, exit, readCoverage}) => {
|
|
|
67
67
|
|
|
68
68
|
export const isSuccess = (error) => !error || error?.status === Number(process.env.ESCOVER_SUCCESS_EXIT_CODE);
|
|
69
69
|
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
const makeCmdSafe = (cmd) => {
|
|
71
|
+
if (cmd.length === 1)
|
|
72
|
+
return cmd.join('');
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
start = '"';
|
|
76
|
-
|
|
77
|
-
if (a.at(-1) !== '"')
|
|
78
|
-
end = '"';
|
|
79
|
-
|
|
80
|
-
return [start, a, end].join('');
|
|
74
|
+
return `"${cmd.join('" "')}"`;
|
|
81
75
|
};
|
|
82
76
|
|
|
83
77
|
export function execute(cmd, overrides) {
|
|
@@ -87,7 +81,7 @@ export function execute(cmd, overrides) {
|
|
|
87
81
|
env = process.env,
|
|
88
82
|
} = overrides;
|
|
89
83
|
|
|
90
|
-
const safeCmd =
|
|
84
|
+
const safeCmd = makeCmdSafe(cmd);
|
|
91
85
|
|
|
92
86
|
const [error] = tryCatch(run, safeCmd, {
|
|
93
87
|
stdio: 'inherit',
|
package/package.json
CHANGED