Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error when listing ds members that include '"' #1753

Merged
merged 2 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/src/zosfiles/edit/Edit.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class EditUtilities {
input = await CliUtils.readPrompt(TextUtils.chalk.green(promptText));
}
while (input != null && input.toLowerCase() != 'y' && input.toLowerCase() != 'n');
if (input === null) {
if (input == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅

throw new ImperativeError({
msg: TextUtils.chalk.red('No input provided. Command terminated. Temp file will persist.')
});
Expand Down
9 changes: 7 additions & 2 deletions packages/zosfiles/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

All notable changes to the Zowe z/OS files SDK package will be documented in this file.

## Recent Changes

- BugFix: Fixed error when listing data set members that include double quote in the name.

## `7.17.0`
- Enhancement: Added streaming capabilities to the Download.dataSet and Download.ussFile methods.
- BugFix: Fixed Get.USSFile API not respecting USS file tags.

- Enhancement: Added streaming capabilities to the `Download.dataSet` and `Download.ussFile` methods.
- BugFix: Fixed `Get.USSFile` API not respecting USS file tags.

## `7.16.6`

Expand Down
2 changes: 1 addition & 1 deletion packages/zosfiles/src/methods/list/List.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class List {
response = JSONUtils.parse(data);
} catch {
// Escape invalid JSON characters in encrypted member names
for (const match of Array.from(data.matchAll(/"member":\s*"(?![A-Za-z@#$][A-Za-z0-9@#$]{0,7}")/g)).reverse()) {
for (const match of Array.from(data.matchAll(/"member":\s*"/g)).reverse()) {
const memberStartIdx = match.index + match[0].length;
const memberNameLength = data.substring(memberStartIdx,
memberStartIdx + data.substring(memberStartIdx).match(/"[A-Za-z]{6,}"\s*:/).index).lastIndexOf(`"`);
Expand Down
Loading