Skip to content

Commit f7760ce

Browse files
Merge branch 'v3.x/staging' into v3.x/bugfix/popen2spawn
2 parents f8789e5 + b342528 commit f7760ce

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/build_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
fi
116116
117117
check-messages:
118-
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
118+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || github.event_name == 'push'
119119
runs-on: ubuntu-latest
120120
defaults:
121121
run:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All notable changes to the Zowe Launcher package will be documented in this file
44
This repo is part of the app-server Zowe Component, and the change logs here may appear on Zowe.org in that section.
55

66
## 3.6.0
7+
- Bugfix: `zowe.sysMessages` are used after the validation ([#208](https://github.com/zowe/launcher/pull/208))
78
- Enhancement: regex replaced by internal routine ([#206](https://github.com/zowe/launcher/pull/206))
89
- Bugfix: Component names must fit the component list ([#195](https://github.com/zowe/launcher/pull/195))
910
- Enhancement: More restrictive permissions ([#212](https://github.com/zowe/launcher/pull/212))

src/main.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static bool check_match_and_wto_message(const char* sys_message_id, const char*
294294
print_wto_directly(input_string + sys_message_pos);
295295
} else {
296296
// The match is in the last WTO_MESSAGE_LENGTH chars
297-
// WTO last WTO_MESSAGE_LENGTH chars - egde case: if the match is last word
297+
// WTO last WTO_MESSAGE_LENGTH chars - edge case: if the match is last word
298298
// user will see the text before match too
299299
print_wto_directly(input_string + (input_string_len - WTO_MESSAGE_LENGTH));
300300
}
@@ -2145,14 +2145,17 @@ static bool validateConfiguration(ConfigManager *cmgr, FILE *out){
21452145
switch (validateStatus){
21462146
case JSON_VALIDATOR_NO_EXCEPTIONS:
21472147
INFO(MSG_CFG_VALID);
2148+
printf_wto(MSG_CFG_VALID); // Manual sys log print (messages not set here yet)
21482149
ok = true;
21492150
break;
21502151
case JSON_VALIDATOR_HAS_EXCEPTIONS:
21512152
ERROR(MSG_CFG_INVALID);
2153+
printf_wto(MSG_CFG_INVALID); // Manual sys log print (messages not set here yet)
21522154
displayValidityException(out,0,validator->topValidityException);
21532155
break;
21542156
case JSON_VALIDATOR_INTERNAL_FAILURE:
21552157
ERROR(MSG_CFG_INTERNAL_FAIL);
2158+
printf_wto(MSG_CFG_INTERNAL_FAIL); // Manual sys log print (messages not set here yet)
21562159
break;
21572160
}
21582161
freeJsonValidator(validator);
@@ -2165,7 +2168,7 @@ int main(int argc, char **argv) {
21652168
}
21662169

21672170
setenv("_BPXK_AUTOCVT", "ON", 1);
2168-
sprintf(launcherVersion, "%d.%d.%d+%d", LAUNCHER_VERSION_MAJOR, LAUNCHER_VERSION_MINOR, LAUNCHER_VERSION_PATCH, LAUNCHER_VERSION_DATE_STAMP);
2171+
snprintf(launcherVersion, sizeof(launcherVersion), "%d.%d.%d+%d", LAUNCHER_VERSION_MAJOR, LAUNCHER_VERSION_MINOR, LAUNCHER_VERSION_PATCH, LAUNCHER_VERSION_DATE_STAMP);
21692172
INFO(MSG_LAUNCHER_START, launcherVersion);
21702173
INFO(MSG_LINE_LENGTH);
21712174
printf_wto(MSG_LAUNCHER_START, launcherVersion); // Manual sys log print (messages not set here yet)
@@ -2209,22 +2212,24 @@ int main(int argc, char **argv) {
22092212
exit(EXIT_FAILURE);
22102213
}
22112214

2212-
set_sys_messages(configmgr);
2213-
22142215
//got root dir, can now load up the schemas from it
22152216
char schemaList[PATH_MAX*2 + 4] = {0};
2216-
snprintf(schemaList, PATH_MAX*2 + 1, "%s/schemas/zowe-yaml-schema.json:%s/schemas/server-common.json", zl_context.root_dir, zl_context.root_dir);
2217+
snprintf(schemaList, PATH_MAX*2 + 1, "%1$s/schemas/zowe-yaml-schema.json:%1$s/schemas/server-common.json", zl_context.root_dir);
22172218
int schemaLoadStatus = cfgLoadSchemas(configmgr, ZOWE_CONFIG_NAME, schemaList);
22182219
if (schemaLoadStatus){
22192220
ERROR(MSG_CFG_SCHEMA_FAIL, schemaLoadStatus);
2221+
printf_wto(MSG_CFG_SCHEMA_FAIL, schemaLoadStatus); // Manual sys log print (messages not set here yet)
22202222
exit(EXIT_FAILURE);
22212223
}
22222224

22232225
if (!validateConfiguration(configmgr, stdout)){
22242226
exit(EXIT_FAILURE);
22252227
}
22262228

2227-
2229+
// At this point, if the zowe.sysMessages is defined,
2230+
// then it is validated => always string with length > 0
2231+
set_sys_messages(configmgr);
2232+
22282233
set_shared_uss_env(configmgr);
22292234

22302235
if (process_workspace_dir(configmgr)) {

0 commit comments

Comments
 (0)