Multiple paths in a single variable for Cache: Push



Description of the feature request

In Input Variables section under Cache:Push, you can set multiple paths separated with newlines; But I need to set multiple paths with a variable defined with a script

Use case / for what or how I would use it

Homebrew can use a Brewfile to declare bundles required for a project, but it doesn’t install those bundles in a specific directory, but in /usr/local/Cellar and /usr/local/opt with all other bundles, which means you can’t just cache the whole brew install path, because it’s too big and contains too many unrelated libraries.

So I need to define a variable that contains those paths with shell script, but I’ve tried several ways including define an array variable and a string variable simply contains \n characters between paths, but none of them worked.

Here’s what I’ve tried as a sample:

cellar_path=$(brew --cellar)
bundles=$(brew bundle list)

for bundle in ${bundles[@]}; do

envman add --key BREW_BUNDLE_PATHS --value $bundle_paths
envman add --key BREW_INSTALL_PATHS --value $install_paths

And in Cache:Push Input Variables I’ve added $BREW_BUNDLE_PATHS and $BREW_INSTALL_PATHS, but it can only recognize the first path, so if I can define the paths with a single variable it’d be very helpful.