You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add desktop notifications for task interactions and status updates
- Introduced `notify-rust` dependency for desktop notifications.
- Updated configuration to include `desktop_notifications` option.
- Implemented `NotificationManager` for handling various notifications:
- Interactive input detection
- Task timeout alerts
- Task failure notifications
- Sudo password prompts
- Completion notifications for all tasks
- Enhanced `TaskExecutor` to utilize notifications during task execution.
- Updated README and example configuration to reflect new notification features.
-`working_dir` – Set the working directory (supports `~`).
142
151
152
+
### Protection Against Hanging Commands
153
+
154
+
Tide includes built-in protections to prevent tasks from hanging:
155
+
156
+
1.**Stdin Redirection**: All regular commands have stdin redirected to `/dev/null`, preventing them from blocking on password prompts or other interactive input.
157
+
158
+
2.**Default Timeout**: Commands without an explicit `timeout` value will be automatically terminated after 5 minutes to prevent indefinite hanging.
159
+
160
+
3.**Proactive Sudo Pre-Authentication**: Tide **always** attempts to pre-authenticate sudo at startup (unless in dry-run mode). This protects against scripts that internally call sudo without being marked with `sudo: true`.
161
+
162
+
```bash
163
+
# At startup, you'll see:
164
+
🔐 Some tasks may require sudo privileges.
165
+
Enter sudo password (or press Ctrl+C to skip):
166
+
```
167
+
168
+
- If you have the password in keychain, it's used automatically
169
+
- You can skip authentication (Ctrl+C or empty password)
170
+
- Password can be saved to macOS Keychain for future runs
171
+
172
+
4.**Heuristic Warnings**: In verbose mode, Tide warns if a command contains "sudo" but isn't marked with `sudo: true`.
173
+
174
+
5.**Helpful Error Messages**: If a command times out, Tide provides actionable error messages suggesting to set `sudo: true` or adjust the `timeout` value.
175
+
176
+
**Important Use Cases:**
177
+
178
+
✅ **Script with internal sudo** - Works even without `sudo: true` thanks to proactive auth:
"Command timed out after {} seconds. This may indicate the command is waiting for input (like sudo password). Consider setting 'sudo: true' or 'timeout: <seconds>' in the task config.",
0 commit comments