simplesurance / baur

An incremental task runner for mono repositories.
GNU General Public License v2.0
362 stars 11 forks source link

diff inputs - Does not accept an app name that contains a dash '-' #236

Closed dbrougham closed 3 years ago

dbrougham commented 3 years ago

Hi,

When using the diff inputs command with an application name that contains a dash the command will throw an error.

Command: baur diff inputs application-one.build application-one.build^

image

If I rename the inputs to application_one.build the command will resolve correctly.

Command: baur diff inputs application_one.build application_one.build^

image

Have narrowed down the root cause to the regex expression used here: https://github.com/simplesurance/baur/blob/ba560e8f282c67f673ff865ce58a7f46e8a52ada/internal/command/diff_inputs.go#L112

My question is what additional characters should also be supported? Or should it allow any characters followed by a single period and then the task name?

fho commented 3 years ago

Hello David,

thanks for the report. That is a bug, dashes should be supported supported in app and task names

My question is what additional characters should also be supported? Or should it allow any characters followed by a single period and then the task name?

I would suggest [\w-]+ for app and task names