There are times that a user might not have SHELL set for some reason.
We should default back to a known shell in the event that SHELL is not
set.

Signed-off-by: Ryan Eatmon <[email protected]>
---
 scripts/oe-setup-build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/oe-setup-build b/scripts/oe-setup-build
index 1cb06b3b79..80d8c70bac 100755
--- a/scripts/oe-setup-build
+++ b/scripts/oe-setup-build
@@ -102,9 +102,9 @@ def setup_build_env(args):
 
     cmd = "TEMPLATECONF={} {}".format(template["templatepath"], cmd_base)
     if not no_shell:
-        cmd = cmd + " && {}".format(os.environ['SHELL'])
+        cmd = cmd + " && {}".format(os.environ.get('SHELL','bash'))
     print("Running:", cmd)
-    subprocess.run(cmd, shell=True, executable=os.environ['SHELL'])
+    subprocess.run(cmd, shell=True, executable=os.environ.get('SHELL','bash'))
 
 parser = argparse.ArgumentParser(description="A script that discovers 
available build configurations and sets up a build environment based on one of 
them. Run without arguments to choose one interactively.")
 parser.add_argument("--layerlist", default=defaultlayers(), help='Where to 
look for available layers (as written out by setup-layers script) (default is 
{}).'.format(defaultlayers()))
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#204369): 
https://lists.openembedded.org/g/openembedded-core/message/204369
Mute This Topic: https://lists.openembedded.org/mt/108382558/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to