Skip to content

Commit

Permalink
fix: fix the "Failed to parse build settings, error: unknown build se…
Browse files Browse the repository at this point in the history
…ttings" error which caused if the output contained a line without a `=` (no key - value pair) (#7)
  • Loading branch information
BirmacherAkos authored Dec 21, 2018
1 parent 327acd5 commit 13e675b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,22 +303,14 @@ func parseShowBuildSettingsOutput(out string) (serialized.Object, error) {

lines := strings.Split(out, "\n")
for _, line := range lines {
if strings.HasPrefix(line, "Build settings") {
continue
}

if strings.HasPrefix(line, "User defaults from command line") {
continue
}

if line == "" {
continue
}

split := strings.Split(line, " = ")

if len(split) < 2 {
return nil, fmt.Errorf("unknown build settings: %s", line)
continue
}

key := strings.TrimSpace(split[0])
Expand Down

0 comments on commit 13e675b

Please sign in to comment.