Fix macOS compatibility: Add portable timeout helper
- Add utils.sh with cross-platform timeout functions for macOS compatibility - Fix sf-logs-tail to use portable_timeout instead of GNU timeout command - Fix test-all-wrappers.sh to use portable_timeout_seconds for testing - Update README.md with macOS compatibility documentation The timeout command is not available by default on macOS, causing sf-logs-tail and test scripts to fail. The new utils.sh provides fallback timeout functionality that works on Linux, macOS with/without GNU coreutils, maintaining exit code 124 compatibility.
This commit is contained in:
10
README.md
10
README.md
@@ -508,6 +508,16 @@ sf-deploy -to DEMO-ORG \
|
||||
- **Flexible Input**: Supports absolute and repository-relative paths
|
||||
- **Command Echo**: Shows the actual `sf` command being executed for transparency
|
||||
- **Focused Workflows**: Deploy, validate, retrieve, test, run Apex, manage orgs, data import/export, and tail logs
|
||||
- **macOS Compatibility**: Full compatibility with macOS using portable timeout implementation
|
||||
|
||||
## macOS Compatibility
|
||||
|
||||
The wrapper scripts include a `utils.sh` helper that provides cross-platform timeout functionality. This ensures that scripts requiring timed execution (like `sf-logs-tail`) work correctly on macOS without requiring GNU coreutils.
|
||||
|
||||
The timeout helper automatically detects and uses:
|
||||
1. `timeout` command (Linux/GNU systems)
|
||||
2. `gtimeout` command (macOS with GNU coreutils)
|
||||
3. Built-in fallback implementation (pure Bash for macOS)
|
||||
|
||||
## Tips
|
||||
|
||||
|
||||
Reference in New Issue
Block a user