AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
ref(classic): Do not 'rm -rf <unquoted variable>' when removing classic env (#8417)
Coenraad Loubser865e3c056d3b
diff --git a/classic/forge/setup b/classic/forge/setupindex eb74669ae1..5fab8ac33a 100755--- a/classic/forge/setup+++ b/classic/forge/setup@@ -2,8 +2,12 @@ENV_PATH=$(poetry env info --path)if [ -d "$ENV_PATH" ]; then- rm -rf $ENV_PATH- echo "Removed the poetry environment at $ENV_PATH."+ if [ -e delete ]; then+ rm -rf "$ENV_PATH" || { echo "Please manually remove $ENV_PATH"; exit 1; }+ else+ echo "Press ENTER to remove $ENV_PATH"+ read && { rm -r "$ENV_PATH" && echo "Removed the poetry environment at $ENV_PATH."; } || { echo "Please manually remove $ENV_PATH."; exit 1; }+ fielseecho "No poetry environment found."fi