Skip to content

Commit

Permalink
Update error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasthomsen committed Aug 21, 2024
1 parent eac4a50 commit 9ff26c8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ trait InternalCodeArtifactKeys {
val codeArtifactToken = taskKey[Option[String]](
"CodeArtifact authentication. Provided by environment variable CODEARTIFACT_AUTH_TOKEN or fetched dynamically from available AWS credentials."
)

val codeArtifactGetTokenInstructions =
taskKey[Option[String]]("Instructions on how to get a token for CodeArtifact")
}

object CodeArtifactKeys extends CodeArtifactKeys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,28 @@ object CodeArtifactPlugin extends AutoPlugin {
),
credentials ++= {
val token = codeArtifactToken.value.getOrElse {
streams.value.log.warn("Unable to get AWS CodeArtifact auth token.")
streams.value.log.warn(
"""
| ___ ______ ____ _ _ _ _ __ _
| / \ \ / / ___| / ___|___ __| | ___ / \ _ __| |_(_)/ _| __ _ ___| |_
| / _ \ \ /\ / /\___ \ | | / _ \ / _` |/ _ \ / _ \ | '__| __| | |_ / _` |/ __| __|
| / ___ \ V V / ___) | | |__| (_) | (_| | __// ___ \| | | |_| | _| (_| | (__| |_
|/_/ \_\_/\_/ |____/ \____\___/ \__,_|\___/_/ \_\_| \__|_|_| \__,_|\___|\__|
|
|
|The AWS CodeArtifact sbt plugin was not able to get a valid auth token. If you recieve and error due to
|the a dependency not being found then it could be caused by this.
|
|""".stripMargin
)

codeArtifactGetTokenInstructions.value.foreach { instructions =>
streams.value.log.warn(
s"""
| ${instructions}
|""".stripMargin
)
}
""
}
val repos = codeArtifactRepo.value +: codeArtifactResolvers.value
Expand Down

0 comments on commit 9ff26c8

Please sign in to comment.