mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-07 02:07:04 +00:00
fix: multiple extra-files are not evaluated properly (#61)
Quoting issues caused multiple extra-files to be ignored.
This commit is contained in:
parent
7a3d46eac7
commit
2567293368
4 changed files with 68 additions and 3 deletions
|
|
@ -95,6 +95,12 @@ func run(cmd *cobra.Command, _ []string) error {
|
|||
}
|
||||
|
||||
func parseExtraFiles(input string) []string {
|
||||
// We quote the arg to avoid issues with the expected newlines in the value.
|
||||
// Need to remove those quotes before parsing the data
|
||||
input = strings.Trim(input, `"`)
|
||||
// In some situations we get a "\n" sequence, where we actually expect new lines,
|
||||
// replace the two characters with an actual new line
|
||||
input = strings.ReplaceAll(input, `\n`, "\n")
|
||||
lines := strings.Split(input, "\n")
|
||||
|
||||
extraFiles := make([]string, 0, len(lines))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue