Skip to content

Fix scriptExecString using bash syntax with sh interpreter#363

Merged
0pcom merged 1 commit intoskycoin:developfrom
0pcom:fix/scriptexec-posix
Apr 1, 2026
Merged

Fix scriptExecString using bash syntax with sh interpreter#363
0pcom merged 1 commit intoskycoin:developfrom
0pcom:fix/scriptexec-posix

Conversation

@0pcom
Copy link
Copy Markdown
Collaborator

@0pcom 0pcom commented Apr 1, 2026

Summary

  • scriptExecString and scriptExecUint used sh -c with bash-only syntax ([[ ]] and source)
  • On systems where sh is dash/POSIX sh (Arch Linux, Ubuntu, etc.), this produces sh: 1: [[: not found
  • The error string leaked into cobra flag defaults, showing as: --addproxy string (default "sh: 1: [[: not found")
  • Fix: change sh -c to bash -c to match the other scriptExec* functions which already use bash -c

Test plan

  • go build ./...
  • golangci-lint run clean
  • skywire dmsg web --help no longer shows shell errors in flag defaults

🤖 Generated with Claude Code

scriptExecString and scriptExecUint used `sh -c` with bash-only syntax
([[ ]] and source). On systems where sh is dash/POSIX sh (e.g. Arch
Linux), this produces errors like "sh: 1: [[: not found" which leaked
into flag defaults, showing as:

  --addproxy string (default "sh: 1: [[: not found")

Change sh -c to bash -c to match the other scriptExec* functions which
already use bash -c.
@0pcom 0pcom merged commit bdcab83 into skycoin:develop Apr 1, 2026
3 checks passed
@0pcom 0pcom deleted the fix/scriptexec-posix branch April 3, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant