Skip to content

Commit

Permalink
Error if dataset/member does not exist
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Zeithaml <[email protected]>
  • Loading branch information
Martin-Zeithaml committed May 21, 2024
1 parent cac1dc2 commit dfc9092
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/commands/init/generate/.errors
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ZWEL0143E|143|Cannot find data set member %s. You may need to re-run zwe install.
ZWEL0157E|157|%s (%s) is not defined in Zowe YAML configuration file.
ZWEL0316E|316|Command requires zowe.useConfigmgr=true to use.
4 changes: 3 additions & 1 deletion bin/commands/init/generate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export function execute(dryRun?: boolean) {
}

const tempFile = fs.createTmpFile();
zosFs.copyMvsToUss(ZOWE_CONFIG.zowe.setup.dataset.prefix + '.SZWESAMP(ZWEGENER)', tempFile);
if (zosFs.copyMvsToUss(ZOWE_CONFIG.zowe.setup.dataset.prefix + '.SZWESAMP(ZWEGENER)', tempFile) !== 0) {
common.printErrorAndExit(`ZWEL0143E Cannot find data set member '${ZOWE_CONFIG.zowe.setup.dataset.prefix + '.SZWESAMP(ZWEGENER)'}'. You may need to re-run zwe install.`, undefined, 143);
}
let jclContents = xplatform.loadFileUTF8(tempFile, xplatform.AUTO_DETECT);

// Replace is using special replacement patterns, by doubling '$' we will avoid that
Expand Down

0 comments on commit dfc9092

Please sign in to comment.