@salesforce/cli-plugins-testkit 2.5.0 → 2.5.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.
Files changed (2) hide show
  1. package/lib/execCmd.js +6 -2
  2. package/package.json +1 -1
package/lib/execCmd.js CHANGED
@@ -67,7 +67,8 @@ const getExitCodeError = (cmd, expectedCode, output) => {
67
67
  */
68
68
  const buildCmd = (cmdArgs, options) => {
69
69
  const debug = (0, debug_1.default)('testkit:buildCmd');
70
- const bin = kit_1.env.getString('TESTKIT_EXECUTABLE_PATH') ?? (0, path_1.join)(process.cwd(), 'bin', 'dev');
70
+ const bin = kit_1.env.getString('TESTKIT_EXECUTABLE_PATH') ??
71
+ (0, path_1.join)(process.cwd(), 'bin', process.platform === 'win32' ? 'dev.cmd' : 'dev');
71
72
  const which = shelljs.which(bin);
72
73
  let resolvedPath = (0, path_1.resolve)(bin);
73
74
  // If which finds the path in the system path, use that.
@@ -211,7 +212,10 @@ async function execInteractiveCmd(command, answers, options = {}) {
211
212
  return new Promise((resolve, reject) => {
212
213
  const bin = buildCmd('').trim();
213
214
  const startTime = process.hrtime();
214
- const child = (0, child_process_1.spawn)(bin, command.split(' '), { ...options, cwd: process.cwd() });
215
+ const opts = process.platform === 'win32'
216
+ ? { shell: true, cwd: process.cwd(), ...options }
217
+ : { cwd: process.cwd(), ...options };
218
+ const child = (0, child_process_1.spawn)(bin, command.split(' '), opts);
215
219
  child.stdin.setDefaultEncoding('utf-8');
216
220
  const seen = new Set();
217
221
  const output = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/cli-plugins-testkit",
3
3
  "description": "Provides test utilities to assist Salesforce CLI plug-in authors with writing non-unit tests (NUT).",
4
- "version": "2.5.0",
4
+ "version": "2.5.2",
5
5
  "author": "Salesforce",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "lib/index.js",