-
Notifications
You must be signed in to change notification settings - Fork 899
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
run-ios command ignores the verbose option #1391
Comments
Okay, I now understand what's going on. Essentially, with commander Potential options I can see;
I'm going to have a look at doing the second option as a starting point. |
I see the project already has a workaround for this in the init command: https://github.com/react-native-community/cli/blob/master/packages/cli/src/commands/init/init.ts#L208. Would another workaround in run-ios be preferable to option 2 above? |
I would imagine we can pass Lines 28 to 30 in 641b21f
Line 138 in 641b21f
{...passedOptions, verbose: commander.verbose()} We have tried upgrading to a newer version, but that was quite a challenge. I would say for now, the easiest workaround is to pass it this way, or provide a utility function Either way, I'd be happy to accept this as a PR! |
Hi, I faced a similar issue on React Native version 0.68.0-rc.2. |
Oh, I forgot to come back to this one. I'll see about doing a PR |
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
Still waiting on PR #1571 to be approved and merged to fix this. |
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
PR conversation stalled, I'll resurrect it. |
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
Environment
Description
run-ios detects the presence of xcpretty and uses it if installed. The command-line help for the run-ios command states:
However, when run with the verbose option, xcpretty is still used.
I've dug into this a little, it looks like the verbose option is checked for in
buildProject()
, here: https://github.com/react-native-community/cli/blob/v4.14.0/packages/platform-ios/src/commands/runIOS/index.ts#L307However, if I debug the command as it's running, verbose is
undefined
.The issue seems to be coming from
Command.prototype.opts()
inside commander. Here it copies the values from properties onthis
(the Command) intoresult[key]
: https://github.com/tj/commander.js/blob/v2.20.3/index.js#L779. This works for other options likepackager
(set via--no-packager
). I can seepackager
, etc exist onthis
for the working properties but for some reasonthis.verbose
doesn't.I've not been able to work out why this happens yet (nor if it's a problem in the cli or commander).
I've also created a fresh RN 0.64.0 project to check the behaviour is the same (and it is).
Reproducible Demo
run-ios
and note xcpretty formatted outputrun-ios --verbose
and note xcpretty formatted output is still presentThe text was updated successfully, but these errors were encountered: