react-native/react-native-git-upgrade
Mateusz Wielgos b9a5862f67 react-native-git-upgrade signal termination
Summary:
When performing an upgrade using react-native-git-upgrade git can fail with a signal, however, only exit codes are accounted for.

Related issue: #12336

In my case, Git fails with a `SIGPIPE` signal - have not figured out why yet, but that's a separate issue. Before, since exit code was not zero, the console would default to the error case, but since no exit code was supplied, the error message was meaningless - `exited with code null`. Now, it errors out with `terminated with signal 'SIGPIPE'`, while still taking account of exit codes. Quoting [nodejs docs](https://nodejs.org/api/child_process.html#child_process_event_exit):

> The 'exit' event is emitted after the child process ends. If the process exited, code is the final exit code of the process, otherwise null. If the process terminated due to receipt of a signal, signal is the string name of the signal, otherwise null. One of the two will always be non-null.

I would be happy to write a test case for this but I haven't seen any react-native-git-upgrade ones?

[CLI] [ENHANCEMENT] [react-native/react-native-git-upgrade] - Git terminated by signal error message
Closes https://github.com/facebook/react-native/pull/16822

Differential Revision: D6387451

Pulled By: shergin

fbshipit-source-id: 25bf9dabdb5fda70d220bcd5f14c3c92bba8c3d4
2017-11-21 12:16:21 -08:00
..
README.md Git upgrade: Tweak wording 2016-12-05 06:28:34 -08:00
checks.js Fix the parse error when specifying an unknown version. 2016-12-02 08:28:32 -08:00
cli.js Revert D5409825: [RN] Convert easy files to Prettier 2017-07-12 19:23:58 -07:00
cliEntry.js react-native-git-upgrade signal termination 2017-11-21 12:16:21 -08:00
index.js Revert D5409825: [RN] Convert easy files to Prettier 2017-07-12 19:23:58 -07:00
package.json Fix react-native-git-upgrade cache busting 2017-02-18 16:45:50 -08:00
yarn.js Revert D5409825: [RN] Convert easy files to Prettier 2017-07-12 19:23:58 -07:00

README.md

React Native Git Upgrade

This tool makes upgrading your apps to a new version of React Native easier than the stock react-native upgrade command.

It uses Git under the hood to automatically resolve merge conflicts in project templates (native iOS and Android files, .flowconfig etc.). These conflicts happen when a new React Native version introduces changes to those files and you have local changes in those files too, which is quite common.

Usage

See the Upgrading docs on the React Native website.

Basic usage:

$ npm install -g react-native-git-upgrade
$ cd MyReactNativeApp
$ react-native-git-upgrade