1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-06 00:13:33 +00:00

Fixed issue, where if child_process type is set to TERM, and environment block is specified without TERM set, TERM doesn't get set.

This commit is contained in:
Bryan Roe
2021-08-10 13:53:17 -07:00
parent 681674f9fd
commit 75a0ae9817

View File

@@ -529,6 +529,13 @@ duk_ret_t ILibDuktape_ChildProcess_execFile(duk_context *ctx)
{
int ecount = 0;
duk_get_prop_string(ctx, i, "env"); // [env]
#ifndef WIN32
if (spawnType == ILibProcessPipe_SpawnTypes_TERM)
{
duk_push_string(ctx, "xterm-256color"); // [env][xterm]
duk_put_prop_string(ctx, -2, "TERM"); // [env]
}
#endif
duk_enum(ctx, -1, DUK_ENUM_OWN_PROPERTIES_ONLY); // [env][enum]
while (duk_next(ctx, -1, 0))
{