From 1d9ed5605e9ad1e4071140741b019fbcb17a70a4 Mon Sep 17 00:00:00 2001 From: Martin Zeithaml Date: Thu, 31 Oct 2024 10:43:11 +0100 Subject: [PATCH] Check log directory Signed-off-by: Martin Zeithaml --- CHANGELOG.md | 1 + bin/libs/logging.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 262fe86796..d76a381ddc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to the Zowe Installer will be documented in this file. ## `2.18.1` +- Bugfix: When `--log-dir` parameter for `zwe` command is a file, there might be an error "InternalError: stack overflow". [#40nn](https://github.com/zowe/zowe-install-packaging/pull/40nn) - Bugfix: Error message `ZWEL0141E` did not print user ID. [#3971](https://github.com/zowe/zowe-install-packaging/pull/3971) ## `2.17.0` diff --git a/bin/libs/logging.sh b/bin/libs/logging.sh index 6e41778aca..787c4fe7a4 100755 --- a/bin/libs/logging.sh +++ b/bin/libs/logging.sh @@ -14,6 +14,9 @@ export ZWE_PRIVATE_LOG_FILE= prepare_log_file() { + if [ -f "${1}" ]; then + print_error_and_exit "Error ZWEL0102E: Invalid parameter --log-dir=${1} (not a directory)" "" 102 + fi # use absolute path to make sure we can always write to correct location even # if other scripts changed current working directory log_dir=$(convert_to_absolute_path "${1}" | remove_trailing_slash)