Closed stirante closed 1 year ago
Going to push this a bit further. Why have two flags?
Why not like:
regolith install --profile
(adds to default profile)regolith install
(installs, maybe prints a warning, saying you need to manually place the filter into a profile?)regolith install --profile box
(adds into box profile)regolith install --profile test dev
(adds into two profiles)This feels fully featured, and we don't need 'add' at that point.
I wanted to make it one flag, but I couldn't find a way with our CLI library to do so
I suggested it to be this way because as far as I know the solution with only one flag might be impossible.
Actually maybe it could be possible with https://github.com/spf13/pflag#setting-no-option-default-values-for-flags
This is a simple change, that adds 1 flag:
--profile
(or-p
) - Adds installed filters to the specified profiles. If no profile is provided, the filters will be added to the default profileExamples:
Additionally I implemented finding values in JSON by simple path. It's not actually JSONPath, but more like a file path. It's a utility function to get around long blocks of getting value, checking if it exists and checking the type.