diff --git a/go.mod b/go.mod index 305150e9..5b91f8c8 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/bitrise-io/go-steputils/v2 v2.0.0-alpha.23 github.com/bitrise-io/go-utils v1.0.11 github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.20 - github.com/bitrise-io/go-xcode v1.0.18 + github.com/bitrise-io/go-xcode v1.0.19 github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.40 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index 50b2df3c..c4489da1 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,8 @@ github.com/bitrise-io/go-utils v1.0.11 h1:NJ9rRWif4C6nhdh/v6Y/sJZU1UJ+yj0mDgnxsD github.com/bitrise-io/go-utils v1.0.11/go.mod h1:ZY1DI+fEpZuFpO9szgDeICM4QbqoWVt0RSY3tRI1heY= github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.20 h1:R+xJRWsuHhF/Pnx0gjI1+HH4Y0YSFVI+U/CbLpSx4sU= github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.20/go.mod h1:Laih4ji980SQkRgdnMCH0g4u2GZI/5nnbqmYT9UfKFQ= -github.com/bitrise-io/go-xcode v1.0.18 h1:guFywV/AwcZuexqIQkL1ixc3QThpbJvA4voa9MqvPto= -github.com/bitrise-io/go-xcode v1.0.18/go.mod h1:9OwsvrhZ4A2JxHVoEY7CPcABAKA+OE7FQqFfBfvbFuY= +github.com/bitrise-io/go-xcode v1.0.19 h1:pbPEIqTHigviG9+1ppMTLv5h6z4k2oz3gKYLKoHJ0yg= +github.com/bitrise-io/go-xcode v1.0.19/go.mod h1:9OwsvrhZ4A2JxHVoEY7CPcABAKA+OE7FQqFfBfvbFuY= github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.40 h1:H4452rgnPqDLRH5mzBvnQ3m7WMt5qZ/RkXFGEFwsXW4= github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.40/go.mod h1:Y3K7ay6Q+znVKFmGGvr4jijnN8QmTBxB5+CatRtBl30= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/vendor/github.com/bitrise-io/go-xcode/xcodebuild/show_build_settings.go b/vendor/github.com/bitrise-io/go-xcode/xcodebuild/show_build_settings.go index b548ffc1..71b6d7bf 100644 --- a/vendor/github.com/bitrise-io/go-xcode/xcodebuild/show_build_settings.go +++ b/vendor/github.com/bitrise-io/go-xcode/xcodebuild/show_build_settings.go @@ -2,7 +2,9 @@ package xcodebuild import ( "bufio" + "bytes" "fmt" + "io" "path/filepath" "strings" @@ -97,21 +99,35 @@ func (c ShowBuildSettingsCommandModel) PrintableCmd() string { func parseBuildSettings(out string) (serialized.Object, error) { settings := serialized.Object{} - scanner := bufio.NewScanner(strings.NewReader(out)) - for scanner.Scan() { - line := strings.TrimSpace(scanner.Text()) + reader := bufio.NewReader(strings.NewReader(out)) + var buffer bytes.Buffer - if split := strings.Split(line, "="); len(split) > 1 { - key := strings.TrimSpace(split[0]) - value := strings.TrimSpace(strings.Join(split[1:], "=")) - value = strings.Trim(value, `"`) + for { + b, isPrefix, err := reader.ReadLine() + if err == io.EOF { + break + } else if err != nil { + return nil, err + } + + lineFragment := string(b) + buffer.WriteString(lineFragment) + + // isPrefix is set to false once a full line has been read + if isPrefix == false { + line := strings.TrimSpace(buffer.String()) - settings[key] = value + if split := strings.Split(line, "="); len(split) > 1 { + key := strings.TrimSpace(split[0]) + value := strings.TrimSpace(strings.Join(split[1:], "=")) + value = strings.Trim(value, `"`) + + settings[key] = value + } + + buffer.Reset() } } - if err := scanner.Err(); err != nil { - return nil, err - } return settings, nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index 29aae001..775ecaab 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -40,7 +40,7 @@ github.com/bitrise-io/go-utils/v2/log github.com/bitrise-io/go-utils/v2/log/colorstring github.com/bitrise-io/go-utils/v2/pathutil github.com/bitrise-io/go-utils/v2/retryhttp -# github.com/bitrise-io/go-xcode v1.0.18 +# github.com/bitrise-io/go-xcode v1.0.19 ## explicit; go 1.20 github.com/bitrise-io/go-xcode/appleauth github.com/bitrise-io/go-xcode/certificateutil