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

Only print report path if it was generated #1137

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ansman
Copy link

@ansman ansman commented Oct 11, 2023

Paparazzi currently assumes a report will always be written which isn't the case if you're verifying or if you use a custom snapshot handler. With this change the logging only happens if a report was written.

This fixes #1135

Paparazzi currently assumes a report will always be written which isn't
the case if you're verifying or if you use a custom snapshot handler.
With this change the logging only happens if a report was written.

This fixes cashapp#1135
}

test.doLast {
val uri = reportOutputDir.get().asFile.toPath().resolve("index.html").toUri()
test.logger.log(LIFECYCLE, "See the Paparazzi report at: $uri")
val report = reportOutputDir.get().asFile.resolve("index.html")
Copy link
Contributor

@TWiStErRob TWiStErRob Oct 11, 2023

Choose a reason for hiding this comment

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

It should keep using the Path API. Otherwise the link will become unclickable in IDEA.

println(file("build.gradle").toURI())
// output: file:/T:/xx/build.gradle
println(file("build.gradle").toPath().toUri())
// output: file:///T:/xx/build.gradle

image

Copy link
Author

Choose a reason for hiding this comment

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

Ah, great callout. I did not realize it mattered how we got a an URI instance. Will fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow not logging the paparazzi report
2 participants