Skip to content

Commit c9921b9

Browse files
committed
more merges
2 parents 3140687 + 2d3c63e commit c9921b9

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ results/
66
__results__/
77
__tests__/__results__/
88
/__tests__/__resources__/properties/**
9-
!/__tests__/__resources__/properties/example_properties.yaml
9+
!/__tests__/__resources__/properties/example_properties.yaml
10+
package-lock.json

__tests__/api/BundleDeploy/BundleDeployer.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ describe("BundleDeployer01", () => {
313313
expect(err.message).toMatchSnapshot();
314314
});
315315
it("should support long bundledir", async () => {
316-
317316
let parms: IHandlerParameters;
318317
parms = DEFAULT_PARAMTERS;
319318
setCommonParmsForDeployTests(parms);
@@ -325,6 +324,13 @@ describe("BundleDeployer01", () => {
325324
"1234567890123456789012345678901234567890123456789012345";
326325
await testDeployJCL(parms);
327326
});
327+
it("should tolerate bundledir with extra slasshes", async () => {
328+
let parms: IHandlerParameters;
329+
parms = DEFAULT_PARAMTERS;
330+
setCommonParmsForDeployTests(parms);
331+
parms.arguments.bundledir = "//bundledir/with/extra//slashes";
332+
await testDeployJCL(parms);
333+
});
328334
it("should generate deploy JCL for AVAILABLE", async () => {
329335

330336
let parms: IHandlerParameters;

__tests__/api/BundleDeploy/__snapshots__/BundleDeployer.test.ts.snap

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,24 @@ UNDEPLOY BUNDLE(12345678)
540540
"
541541
`;
542542

543-
exports[`BundleDeployer01 should tolerate empty output from DFHDPLOY 1`] = `"DFHDPLOY did not generate any output. Most recent status update: 'Submitting DFHDPLOY JCL for the DEPLOY action'."`;
543+
exports[`BundleDeployer01 should tolerate bundledir with extra slasshes 1`] = `
544+
"//DFHDPLOY JOB DFHDPLOY,CLASS=A,MSGCLASS=X,TIME=NOLIMIT
545+
//DFHDPLOY EXEC PGM=DFHDPLOY,REGION=100M
546+
//STEPLIB DD DISP=SHR,DSN=12345678901234567890123456789012345.SDFHLOAD
547+
// DD DISP=SHR,DSN=abcde12345abcde12345abcde12345abcde.SEYUAUTH
548+
//SYSTSPRT DD SYSOUT=*
549+
//SYSIN DD *
550+
*
551+
SET CICSPLEX(12345678);
552+
*
553+
DEPLOY BUNDLE(12345678)
554+
BUNDLEDIR(/bundledir/with/extra/slashes)
555+
SCOPE(12345678)
556+
STATE(ENABLED)
557+
/*
558+
"
559+
`;
560+
561+
exports[`BundleDeployer01 should tolerate empty output from DFHDPLOY 1`] = `"DFHDPLOY did not generate any output. Most recent status update: 'Submitting DFHDPLOY JCL'."`;
544562

545563
exports[`BundleDeployer01 should undeploy successfully 1`] = `"Bundle undeployment successful."`;

src/api/BundleDeploy/BundleDeployer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { IHandlerParameters, Logger, ImperativeError, AbstractSession, ITaskWith
1515
TaskStage , TaskProgress} from "@zowe/imperative";
1616
import { ZosmfSession, SubmitJobs, List } from "@zowe/cli";
1717
import { ParmValidator } from "./ParmValidator";
18+
import * as path from "path";
1819

1920
/**
2021
* Class to represent a CICS Bundle Deployer.
@@ -140,9 +141,12 @@ export class BundleDeployer {
140141
* @memberof BundleDeployer
141142
*/
142143
private getDeployJCL(): string {
144+
// Get rid of any extra slashes which may be needed on git-bash to avoid path munging
145+
const bundledir = path.posix.normalize(this.params.arguments.bundledir);
146+
143147
const jcl = this.generateCommonJCLHeader() +
144148
this.wrapLongLineForJCL("DEPLOY BUNDLE(" + this.params.arguments.name + ")\n") +
145-
this.wrapLongLineForJCL(" BUNDLEDIR(" + this.params.arguments.bundledir + ")\n") +
149+
this.wrapLongLineForJCL(" BUNDLEDIR(" + bundledir + ")\n") +
146150
this.generateCommonJCLFooter();
147151

148152
return jcl;

0 commit comments

Comments
 (0)