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
I have a config setup which has 2 rules, one is to run a script the other is to find some files and delete them as a cleanup. This works just fine when I manually run organise run from the terminal.
However, when I set the application to run via launchctl then it only processes one of the rules (the script). With no hints as to what happened with the other.
I have tried various things, checked permissions, run as root - always the same, works fine manually, doesn't process as a service. I have tried adding more rules, reordering, and still, the only one which is processed is the script 🤔
Screenshots
This is a recent output from a manual run
edwilde@computer ~/L/A/organize> organize sim
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ SIMULATION │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Config: "config.yaml"
⚙ Rule #0: Delete old snapshot files ────────────────────────────────────────────────────────────────────────────────────────
/Users/edwilde/Downloads
./example.sql
- (echo) Deleting old snapshot file: /Users/edwilde/Downloads/example.sql
- (trash) Trash "/Users/edwilde/Downloads/example.sql"
⚙ Rule #1 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
(echo) Running cleanup-test-databases.sh
(shell) ** not run in simulation ** $ /Users/edwilde/Scripts/cleanup-test-databases.sh
success 2 / fail 0
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ SIMULATION │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Here is the output when run via launchctl
Script started at Thu Sep 5 07:51:18 NZST 2024
Running organize command...
Config: "/Users/edwilde/Library/Application Support/organize/config.yaml"
⚙ Rule #2 ──────────────────────────────────────────────────────────────────────
(echo) Running cleanup-test-databases.sh
(shell) $ /Users/edwilde/Scripts/cleanup-test-databases.sh
success 1 / fail 0
Script ended at Thu Sep 5 07:51:22 NZST 2024
Environment (please complete the following information):
#!/bin/bash
LOG_FILE="/Users/edwilde/Library/Application Support/organize/run-organize.log"echo"Script started at $(date)">>"$LOG_FILE"echo"Running organize command...">>"$LOG_FILE"
/opt/homebrew/bin/organize run "/Users/edwilde/Library/Application Support/organize/config.yaml">>"$LOG_FILE"2>&1echo"Script ended at $(date)">>"$LOG_FILE"
The text was updated successfully, but these errors were encountered:
Describe the bug
This is a weird issue.
I have a config setup which has 2 rules, one is to run a script the other is to find some files and delete them as a cleanup. This works just fine when I manually run
organise run
from the terminal.However, when I set the application to run via
launchctl
then it only processes one of the rules (the script). With no hints as to what happened with the other.I have tried various things, checked permissions, run as root - always the same, works fine manually, doesn't process as a service. I have tried adding more rules, reordering, and still, the only one which is processed is the script 🤔
Screenshots
This is a recent output from a manual run
Here is the output when run via
launchctl
Environment (please complete the following information):
organize --version
:organize v3.2.5
Your config file
~/Library/LaunchAgents/com.edwilde.organize.plist
~/Library/Application Support/organize/run-organize.sh
The text was updated successfully, but these errors were encountered: