-
Notifications
You must be signed in to change notification settings - Fork 118
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: Print Flank version only on run command #1585
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Timestamp: 2021-02-12 15:49:47 |
@@ -68,6 +69,13 @@ private fun getResource(name: String): InputStream { | |||
?: throw FlankGeneralError("Unable to find resource: $name") | |||
} | |||
|
|||
fun printVersionInfo() { | |||
logLn("version: " + readVersion()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logLn("version: " + readVersion()) | |
logLn("version:${readVersion}") |
?
The same for all 2 lines below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Changed!
@@ -59,6 +60,9 @@ class AndroidRunCommand : CommonRunCommand(), Runnable { | |||
} | |||
|
|||
override fun run() { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm do you have git pre commit working? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but pre commit hook not catch that. I removed this line! Thanks!
It would be great to have a couple of tests to verify it, do you think it requires lots of work to implement it? |
Right! Tests added! 👍 |
e796e35
to
15ac48c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested few commands (flank ios versions list
, flank android models list
, flank network-profiles list
) and middle command (help of groups) - version is not printed
Tested (flank -v
, flank android run
, flank ios run
) - Version is printed
Code looks good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that now we are absolutely sure that the version will not be printed in other commands than run, but IMO from a maintenance perspective, it's a bad idea to have a test for checking that something wasn't occurring. Do you know what I mean? There is an infinite number of things that cannot occur in flank runtime, we shouldn't focus on them.
795b715
to
b616b0a
Compare
Fixes #1561
Test Plan
I case
II case
--version
III case