Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix error message when no repo is found #337

Merged
merged 2 commits into from May 27, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -7,7 +7,7 @@ import retrofit2.converter.moshi.MoshiConverterFactory

internal class Nexus(
baseUrl: String,
username: String,
private val username: String,
password: String,
private val stagingRepository: String?
) {
Expand Down Expand Up @@ -38,7 +38,7 @@ internal class Nexus(
val allRepositories = getProfileRepositories() ?: emptyList()

if (allRepositories.isEmpty()) {
throw IllegalArgumentException("No staging repository prefixed with. Make sure you called \"./gradlew publish\".")
throw IllegalArgumentException("No staging repositories found in account ${username}. Make sure you called \"./gradlew publish\".")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also include the username in throw IOException("Cannot get profileRepositories: ${profileRepositoriesResponse.errorBody()?.string()}")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added it there and also to the other error messages f793dd3

}

val candidateRepositories = if (stagingRepository != null) {
Expand Down