mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 07:43:50 +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:
@@ -529,6 +529,13 @@ duk_ret_t ILibDuktape_ChildProcess_execFile(duk_context *ctx)
|
|||||||
{
|
{
|
||||||
int ecount = 0;
|
int ecount = 0;
|
||||||
duk_get_prop_string(ctx, i, "env"); // [env]
|
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]
|
duk_enum(ctx, -1, DUK_ENUM_OWN_PROPERTIES_ONLY); // [env][enum]
|
||||||
while (duk_next(ctx, -1, 0))
|
while (duk_next(ctx, -1, 0))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user