Skip to content

Commit

Permalink
Upper case --ds-prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Zeithaml <[email protected]>
  • Loading branch information
Martin-Zeithaml committed Nov 3, 2023
1 parent 109b54e commit 48be354
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/commands/install/clix.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as common from '../../libs/common';
import * as zosdataset from '../../libs/zos-dataset';

const prefix = std.getenv("ZWE_CLI_PARAMETER_DATASET_PREFIX");
if (!prefix || !zosdataset.validDatasetName(prefix)){
if (!prefix || !zosdataset.validDatasetName(prefix.toUpperCase())) {
common.printLevel1Message("Install Zowe MVS data sets");
common.printErrorAndExit(`Error ZWEL0102E: Invalid parameter --dataset-prefix="${prefix}".`, undefined, 102);
}
Expand Down
4 changes: 2 additions & 2 deletions bin/commands/install/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

USE_CONFIGMGR=$(check_configmgr_enabled)
if [ "${USE_CONFIGMGR}" = "true" ]; then
if [ -z "${ZWE_CLI_PARAMETER_CONFIG}" ]; then
if [ -n "${ZWE_CLI_PARAMETER_DATASET_PREFIX}" ]; then
_CEE_RUNOPTS="XPLINK(ON),HEAPPOOLS(OFF)" ${ZWE_zowe_runtimeDirectory}/bin/utils/configmgr -script "${ZWE_zowe_runtimeDirectory}/bin/commands/install/clix.js"
else
if [ -z "${ZWE_PRIVATE_TMP_MERGED_YAML_DIR}" ]; then
Expand All @@ -38,7 +38,7 @@ ${ZWE_PRIVATE_DS_SZWEEXEC}|Zowe executable utilities library|dsntype(library) ds
# validation
if [ -n "${ZWE_CLI_PARAMETER_DATASET_PREFIX}" ]; then
prefix="${ZWE_CLI_PARAMETER_DATASET_PREFIX}"
prefix_validate=$(echo "${prefix}" | grep -E '^([A-Z\$\#\@]){1}([A-Z0-9\$\#\@\-]){0,7}(\.([A-Z\$\#\@]){1}([A-Z0-9\$\#\@\-]){0,7}){0,11}$')
prefix_validate=$(echo "${prefix}" | tr '[:lower:]' '[:upper:]' | grep -E '^([A-Z\$\#\@]){1}([A-Z0-9\$\#\@\-]){0,7}(\.([A-Z\$\#\@]){1}([A-Z0-9\$\#\@\-]){0,7}){0,11}$')
if [ -z "${prefix_validate}" ]; then
print_error_and_exit "Error ZWEL0102E: Invalid parameter --dataset-prefix=\"${prefix}\"." "" 102
fi
Expand Down

0 comments on commit 48be354

Please sign in to comment.