diff options
| author | Grail Finder <wohilas@gmail.com> | 2026-01-13 16:20:49 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2026-01-13 16:20:49 +0300 |
| commit | 93de9f7bd9cdf52c1835ccb181d9f68ec619a11d (patch) | |
| tree | 0ed8b6be1b3e3b658599e759267cae0c7227db42 | |
| parent | ed504ba43ce45417f8e8e1423be2c1c232843e95 (diff) | |
Enha(tools): success msg for shell commands
| -rw-r--r-- | tools.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -684,6 +684,12 @@ func executeCommand(args map[string]string) []byte { return []byte(msg) } + // Check if output is empty and return success message + if len(output) == 0 { + successMsg := fmt.Sprintf("command '%s %s' executed successfully and exited with code 0", command, strings.Join(cmdArgs, " ")) + return []byte(successMsg) + } + return output } |
