aboutsummaryrefslogtreecommitdiff
path: root/libbb/appletlib.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-05-08 11:05:30 +0100
committerRon Yorston <rmy@pobox.com>2022-05-08 11:05:30 +0100
commit3194a475deb5e3e9e7aef680d9bf5fb0a63d551a (patch)
tree3f67439af8aca8b754d0a1c8146d5118b6bd83ae /libbb/appletlib.c
parentdc6dbbd9601aeaa9f715b2ea8ec128e6b7846eb9 (diff)
downloadbusybox-w32-3194a475deb5e3e9e7aef680d9bf5fb0a63d551a.tar.gz
busybox-w32-3194a475deb5e3e9e7aef680d9bf5fb0a63d551a.tar.bz2
busybox-w32-3194a475deb5e3e9e7aef680d9bf5fb0a63d551a.zip
ash: export certain variables to the environment immediately
The environment variables BB_OVERRIDE_APPLETS, BB_SKIP_ANSI_EMULATION and BB_SYSTEMROOT affect of the behaviour of the shell itself. Setting them as shell variables is insufficient for them to affect the current shell. When these three variables are exported from the shell they are now placed in the environment immediately. Conversely, when they're unset or unexported they're removed from the environment.
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r--libbb/appletlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 8d58ce2ea..9e415610d 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -268,7 +268,7 @@ int FAST_FUNC is_applet_preferred(const char *name)
268 const char *var, *s; 268 const char *var, *s;
269 size_t len; 269 size_t len;
270 270
271 var = getenv("BB_OVERRIDE_APPLETS"); 271 var = getenv(BB_OVERRIDE_APPLETS);
272 if (var && *var) { 272 if (var && *var) {
273 /* '-' overrides all applets */ 273 /* '-' overrides all applets */
274 if (var[0] == '-' && var[1] == '\0') 274 if (var[0] == '-' && var[1] == '\0')