Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master cauldron by Justin Boffemmyer (2f9d32099e46cfd5090f53d9d0ced9c51d0ed5ba)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Justin Boffemmyer <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master cauldron by Justin Boffemmyer (2f9d32099e46cfd5090f53d9d0ced9c51d0ed5ba)
  • Date: Sat, 15 Mar 2025 04:04:41 +0000

GIT changes to master cauldron by Justin Boffemmyer <flux AT sourcemage.org>:

cauldron/bin/cauldron | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 2f9d32099e46cfd5090f53d9d0ced9c51d0ed5ba
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

cauldron: handle corner cases in REPL

Perform better error checking and present more understandable error
messages if the user attempts to set environment variables or call
non-existent commands/functions.

diff --git a/cauldron/bin/cauldron b/cauldron/bin/cauldron
index ffa0f37..3aa6e46 100755
--- a/cauldron/bin/cauldron
+++ b/cauldron/bin/cauldron
@@ -739,7 +739,20 @@ function command_shell() {

if ! get_command -t "$input"
then
+ # check if the user is trying to set a shell variable
+ case "$input" in
+ *=*)
+ libcolor_msg warn "this REPL does not support setting variables"
+ continue
+ ;;
+ esac
# attempt to run the command through the regular shell as a backup
+ if ! command -v $input >/dev/null
+ then
+ echo "$cmd"
+ libcolor_msg error "command not found: $input"
+ continue
+ fi
$input
input=""
continue
@@ -779,7 +792,7 @@ function get_command() {
return 1
fi

- if ! declare -lF "$cmd"
+ if ! command -v "$cmd" >/dev/null
then
return 1
fi


  • [[SM-Commit] ] GIT changes to master cauldron by Justin Boffemmyer (2f9d32099e46cfd5090f53d9d0ced9c51d0ed5ba), Justin Boffemmyer, 03/15/2025

Archive powered by MHonArc 2.6.24.

Top of Page