Variable substitution only replaces the first encountered instance of substring.
am using a branch “feature/test/dashes” and am getting the following:
feature-test/dashes" is not a valid repository/tag
So it’s replaced the first instance of “/”, but not the second one. I would have expected it to replace all the instances of “/” in my branch name.
The reason is because a single
/ replaces the first match, where as
// replaces all matches. If you want to replace all matches you can adjust the syntax slightly:
We have a unit test that verifies this functionality: