-
Notifications
You must be signed in to change notification settings - Fork 906
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
refactor(cli-platform-apple): move installing and launching app logic to separate function #2234
Conversation
0a265a5
to
b4043bd
Compare
buildOutput: string, | ||
scheme: string, | ||
target: string | undefined, | ||
buildSettings: any, |
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.
can we refine that type?
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.
Shouldn't this be of type BuildSettings
from here
} | ||
|
||
type Options = { | ||
buildOutput: any; |
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.
Let's add some basic type. According to data flow this can be undefined
and I'm not sure if it's handled properly
packages/cli-platform-apple/src/commands/runCommand/installApp.ts
Outdated
Show resolved
Hide resolved
c7efeca
to
140c015
Compare
if (!buildSettings) { | ||
throw new CLIError('Failed to get build settings for your project'); | ||
} |
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.
That's also not the most informative error ever, soon in a separate PR I'll fix all errors in this place :)
buildOutput: string, | ||
scheme: string, | ||
target: string | undefined, | ||
buildSettings: any, |
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.
Shouldn't this be of type BuildSettings
from here
140c015
to
99331cc
Compare
99331cc
to
31e7718
Compare
Summary:
Moves installing and launching app logic to separate function, so that adding additional logic for another platforms will be fairly easy.
Test Plan:
Works same as before.
Checklist