Skip to content

Commit

Permalink
Merge branch 'next' into zowe-version-workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Amber Torrise <[email protected]>
  • Loading branch information
ATorrise authored Jul 29, 2024
2 parents 7b3baa3 + 64930b9 commit acafe24
Show file tree
Hide file tree
Showing 22 changed files with 313 additions and 135 deletions.
8 changes: 8 additions & 0 deletions __tests__/__packages__/cli-test-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Zowe CLI test utils package will be documented in this file.

## `8.0.0-next.202407262216`

- Update: See `7.28.2` for details

## `8.0.0-next.202407021516`

- BugFix: Updated dependencies for technical currency [#2188](https://github.com/zowe/zowe-cli/pull/2188)
Expand All @@ -14,6 +18,10 @@ All notable changes to the Zowe CLI test utils package will be documented in thi

- Major: First major version bump for V3

## `7.28.2`

- BugFix: Improved the error message shown on Windows when `runCliScript` method cannot find `sh` executable on PATH. [#2208](https://github.com/zowe/zowe-cli/issues/2208)

## `7.18.11`

- BugFix: Fix types error from an incorrect jstree type during compilation
Expand Down
4 changes: 2 additions & 2 deletions __tests__/__packages__/cli-test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zowe/cli-test-utils",
"version": "8.0.0-next.202407232256",
"version": "8.0.0-next.202407262216",
"description": "Test utilities package for Zowe CLI plug-ins",
"author": "Zowe",
"license": "EPL-2.0",
Expand Down Expand Up @@ -43,7 +43,7 @@
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"@types/uuid": "^10.0.0",
"@zowe/imperative": "8.0.0-next.202407232256"
"@zowe/imperative": "8.0.0-next.202407262216"
},
"peerDependencies": {
"@zowe/imperative": "^8.0.0-next"
Expand Down
13 changes: 9 additions & 4 deletions __tests__/__packages__/cli-test-utils/src/TestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import * as fs from "fs";
import { spawnSync, SpawnSyncReturns } from "child_process";
import { spawnSync, SpawnSyncReturns, ExecFileException } from "child_process";
import { ITestEnvironment } from "./environment/doc/response/ITestEnvironment";
import { CommandProfiles, ICommandDefinition, IHandlerParameters } from "@zowe/imperative";

Expand All @@ -37,11 +37,16 @@ export function runCliScript(scriptPath: string, testEnvironment: ITestEnvironme

if (process.platform === "win32") {
// Execute the command synchronously
return spawnSync("sh", [`${scriptPath}`].concat(args), {
const response = spawnSync("sh", [scriptPath].concat(args), {
cwd: testEnvironment.workingDir,
env: childEnv,
encoding: "buffer"
encoding: "buffer",
env: childEnv
});
if ((response.error as ExecFileException)?.code === "ENOENT") {
throw new Error(`"sh" is missing from your PATH. Check that Git Bash is installed with the option to ` +
`"Use Git and Unix Tools from Windows Command Prompt".`);
}
return response;
}

// Check to see if the file is executable
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "8.0.0-next.202407232256",
"version": "8.0.0-next.202407262216",
"command": {
"publish": {
"ignoreChanges": [
Expand Down
122 changes: 61 additions & 61 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit acafe24

Please sign in to comment.