[PR #40] [MERGED] "Send Command" shell whitespace fix #55

Closed
opened 2026-03-02 02:13:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amidaware/rmmagent/pull/40
Author: @SoarinFerret
Created: 11/25/2023
Status: Merged
Merged: 12/23/2023
Merged by: @wh1te909

Base: developHead: send-command-shell-fix


📝 Commits (1)

  • 751b50e Fix bug where you cannot use '/usr/bin/env bash' as the shell for systems where bash is in a different location

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 agent/agent.go (+2 -1)

📄 Description

If you try to use /usr/bin/env bash as the custom shell in Send Command, no output is returned. This is because gocmd wants the first parameter to be the executable, with everything else being arguments afterwards.

This simple 2 line patch fixes aforementioned issue. This is useful on systems like NixOS, where bash is not in an easily identifiable location, so you have to use the above syntax.

I do not know if this code would be useful in the other cases in the if statement - if so, I could update the patch to include those.

Thanks in advance!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amidaware/rmmagent/pull/40 **Author:** [@SoarinFerret](https://github.com/SoarinFerret) **Created:** 11/25/2023 **Status:** ✅ Merged **Merged:** 12/23/2023 **Merged by:** [@wh1te909](https://github.com/wh1te909) **Base:** `develop` ← **Head:** `send-command-shell-fix` --- ### 📝 Commits (1) - [`751b50e`](https://github.com/amidaware/rmmagent/commit/751b50e071174981da329d530505971e18e21dde) Fix bug where you cannot use '/usr/bin/env bash' as the shell for systems where bash is in a different location ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `agent/agent.go` (+2 -1) </details> ### 📄 Description If you try to use `/usr/bin/env bash` as the custom shell in `Send Command`, no output is returned. This is because gocmd wants the first parameter to be the executable, with everything else being arguments afterwards. This simple 2 line patch fixes aforementioned issue. This is useful on systems like NixOS, where bash is not in an easily identifiable location, so you have to use the above syntax. I do not know if this code would be useful in the other cases in the if statement - if so, I could update the patch to include those. Thanks in advance! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 02:13:00 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rmmagent#55
No description provided.