Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#309] ydb_env_set should not clear gtm_prompt env var in case ydb_pr…
…ompt env var is undefined ydb_env_set called ydbenv.mpt which checked if ydb_prompt is defined and if so generated a line that set gtm_prompt env var to the value of $ydb_prompt. This had an issue starting YottaDB r1.22 when ydb_prompt env var is undefined but gtm_prompt env var is defined. Some context first. As part of #209 in r1.22, support was added for ydb_* environment variables to automatically inherit the value of gtm_* environment variables at process startup if the ydb_* variable is not defined but the gtm_* variable is. Because of this change, a scenario where a mumps process is started with gtm_prompt defined and ydb_prompt not defined implies ydb_prompt env var is set at process startup to the same value so inside M code one can never find themselves in a situation where ydb_prompt is undefined and gtm_prompt is defined. Because of this, in ydbenv.mpt, in r1.22 and later versions, one would always go inside the below else condition in ydbenv.mpt. else write "export gtm_prompt=$ydb_prompt",! But since this is a generated file that is sourced by the parent script (ydb_env_set) after the mumps process terminates, ydb_prompt env var is undefined at that point and so the env var gtm_prompt gets set to "" inside ydb_env_set and after it returns to the caller. This is now fixed by removing the entire block of code which tried to generate shell commands to set gtm_prompt and/or ydb_prompt to the appropriate values. None of this is needed since YottaDB automatically handles the case where only one of gtm_prompt/ydb_prompt is defined.
- Loading branch information