ttscoff / bunch

Documentation repository for Bunch.app
https://bunchapp.co
116 stars 5 forks source link

Value for variable BUNCH(_DIR) not provided #294

Closed RosemaryOrchard closed 10 months ago

RosemaryOrchard commented 1 year ago

I've been having some issues with a Bunch which looks as follows (this is my "Edit Bunch Files" bunch.):

Visual Studio Code^
- $BUNCH_DIR

${myBrowser}
- https://bunchapp.co/docs/

I've been trying to find out why VSCode wasn't opening the Bunch folder, so I went down a debugging rabbit hole and did this:

(log BUNCH is set to ${BUNCH})
(log BUNCH_DIR is set to ${BUNCH_DIR})

The logger outputs:

2023-04-07 18:36:17: 🟡Value for variable BUNCH not provided, removing
2023-04-07 18:36:17: 🟡Value for variable BUNCH_DIR not provided, removing
2023-04-07 18:36:17: 🟡[Edit Bunch Files] Logger: BUNCH is set to
2023-04-07 18:36:17: 🟡[Edit Bunch Files] Logger: BUNCH_DIR is set to

According to the docs these variables ought to be set, but seemingly they aren't! I may have broken something, or maybe Bunch has lost these along the way?

ttscoff commented 1 year ago

Those environment variables are populated for shell scripts, they’re not available for conditional statements. You could have a “run before” script that returned YAML containing your BUNCH_DIR variable, or just populate it with something like

dir = $ echo $BUNCH_DIR

Or I could just add this to default variables, but it might be a while before I get to it.

Thanks, Brett On Apr 7, 2023 at 8:41 PM -0500, Rosemary Orchard @.***>, wrote:

I've been having some issues with a Bunch which looks as follows (this is my "Edit Bunch Files" bunch.): Visual Studio Code^

  • $BUNCH_DIR

${myBrowser}

  • https://bunchapp.co/docs/ I've been trying to find out why VSCode wasn't opening the Bunch folder, so I went down a debugging rabbit hole and did this: (log BUNCH is set to ${BUNCH}) (log BUNCH_DIR is set to ${BUNCH_DIR}) The logger outputs: 2023-04-07 18:36:17: 🟡Value for variable BUNCH not provided, removing 2023-04-07 18:36:17: 🟡Value for variable BUNCH_DIR not provided, removing 2023-04-07 18:36:17: 🟡[Edit Bunch Files] Logger: BUNCH is set to 2023-04-07 18:36:17: 🟡[Edit Bunch Files] Logger: BUNCH_DIR is set to According to the docs these variables ought to be set, but seemingly they aren't! I may have broken something, or maybe Bunch has lost these along the way? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
ttscoff commented 10 months ago

Ok, I finally got around to adding this, but apparently VS Code doesn't respond to File Open commands for directories? It works if I use:

Visual Studio Code
$ code "${BUNCH_DIR}"

That allows VSC to launch and quit with the Bunch, and opens the directory properly in a new window (or raises an existing window). I don't know why - ${BUNCH_DIR} doesn't work as a file input. Anyway, this variable will be populated in the next beta release.

ttscoff commented 10 months ago
2024-01-01 13:38:25: 🔘[Test] 2 items added to Bunch
2024-01-01 13:38:25: ⚪[Test] Processing command "log BUNCH is set to Test"
2024-01-01 13:38:25: 🟡[Test] Logger: BUNCH is set to Test
2024-01-01 13:38:25: 🔘Generating status menu
2024-01-01 13:38:25: ⚪[Test] Processing command "log BUNCH_DIR is set to /Users/ttscoff/Dropbox/Sy…"
2024-01-01 13:38:25: 🟡[Test] Logger: BUNCH_DIR is set to /Users/ttscoff/Dropbox/Sync/Bunches
2024-01-01 13:39:05: 🔘Files in /Users/ttscoff/Dropbox/Sync/Bunches have changed
2024-01-01 13:39:05: 🔘Refreshing Bunches