[Lldb-commits] [lldb] [lldb] Add actionable feedback when overwriting a command fails (PR #76030)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 20 03:10:55 PST 2023


================
@@ -161,6 +161,19 @@ def cleanup():
         )
         self.expect("my_command", substrs=["a.out"])
 
+        # Test that without --overwrite we are not allowed to redefine the command.
+        self.expect(
+            "command script add my_command --class welcome.TargetnameCommand",
+            substrs=[
+                (
+                    'user command "my_command" already exists and force replace was'
+                    " not set by --overwrite or 'settings set"
+                    " interpreter.require-overwrite false'"
+                ),
+            ],
+            error=True,
----------------
DavidSpickett wrote:

I welcome our new robot formatting overlords, even if they do strange things sometimes. Iirc it uses `"` if there is `'` in the string and vice versa, instead of `"""`.

https://github.com/llvm/llvm-project/pull/76030


More information about the lldb-commits mailing list