public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Ryan Eatmon <reatmon@ti.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [OE-core][PATCH] oe-setup-build: Change how we get the SHELL value
Date: Tue, 10 Sep 2024 15:17:24 -0500	[thread overview]
Message-ID: <20240910201724.3652-1-reatmon@ti.com> (raw)

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 <reatmon@ti.com>
---
 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



                 reply	other threads:[~2024-09-10 20:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240910201724.3652-1-reatmon@ti.com \
    --to=reatmon@ti.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox