Skip to content

Commit

Permalink
Use .contains(bucket) instead of .find
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstraponline committed Jan 8, 2019
1 parent 5f31c34 commit f9ba9b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion release_notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## v4.2.0 (unreleased)

- TODO
- Fix create Gcs bucket [#444](https://github.com/TestArmada/flank/pull/444)

## v4.1.1

Expand Down
3 changes: 1 addition & 2 deletions test_runner/src/main/kotlin/ftl/args/ArgsHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ object ArgsHelper {

val bucketListOption = Storage.BucketListOption.prefix(bucket)
val storageList = storage.list(bucketListOption).values?.map { it.name } ?: emptyList()
val targetBucket = storageList.find { it == bucket }
if (targetBucket != null) return targetBucket
if (storageList.contains(bucket)) return bucket

return storage.create(
BucketInfo.newBuilder(bucket)
Expand Down

0 comments on commit f9ba9b5

Please sign in to comment.