Add missing "--terminal" argument to run-android (#20584)
Add missing "--terminal" argument to run-android (#20584)

Summary:
Commit 79e498b7fbf19ab50bb73697602910fb827ff928 claims that "--terminal" has been added as an argument to the "run-android" script which it hasn't. Instead it adds a new environment variable "process.env.REACT_TERMINAL" which seems to be undocumented and nowhere else in the repository.

This commit now allows Linux and OSX users to specify their custom terminal :

    react-native run-android --terminal=x-terminal-emulator

Additionally the metro bundler child process "detached" option has been set to false if no terminal has been specified on Linux which fixes an issue where the packager would be running in the background and would have to manually be closed by finding the process.

Fixes #18122
Pull Request resolved: https://github.com/facebook/react-native/pull/20584

Differential Revision: D9234990

Pulled By: hramos

fbshipit-source-id: 60e4cc57b2790c419d5a4f9027add04313ddf6f8

javache/react-native,hammerandchisel/react-native,janicduplessis/react-native,arthuralee/react-native,javache/react-native,javache/react-native,exponentjs/react-native,javache/react-native,arthuralee/react-native,myntra/react-native,exponentjs/react-native,arthuralee/react-native,exponentjs/react-native,hoangpham95/react-native,hoangpham95/react-native,exponent/react-native,hoangpham95/react-native,arthuralee/react-native,janicduplessis/react-native,janicduplessis/react-native,hammerandchisel/react-native,facebook/react-native,myntra/react-native,javache/react-native,exponent/react-native,myntra/react-native,myntra/react-native,facebook/react-native,hammerandchisel/react-native,javache/react-native,hammerandchisel/react-native,hammerandchisel/react-native,janicduplessis/react-native,myntra/react-native,pandiaraj44/react-native,hammerandchisel/react-native,hoangpham95/react-native,pandiaraj44/react-native,myntra/react-native,myntra/react-native,pandiaraj44/react-native,hoangpham95/react-native,facebook/react-native,facebook/react-native,myntra/react-native,facebook/react-native,exponentjs/react-native,janicduplessis/react-native,hoangpham95/react-native,janicduplessis/react-native,pandiaraj44/react-native,exponentjs/react-native,facebook/react-native,facebook/react-native,janicduplessis/react-native,pandiaraj44/react-native,facebook/react-native,hammerandchisel/react-native,exponent/react-native,pandiaraj44/react-native,hammerandchisel/react-native,pandiaraj44/react-native,myntra/react-native,exponentjs/react-native,facebook/react-native,exponentjs/react-native,javache/react-native,janicduplessis/react-native,exponent/react-native,javache/react-native,exponentjs/react-native,exponent/react-native,arthuralee/react-native,hoangpham95/react-native,javache/react-native,exponent/react-native,pandiaraj44/react-native,hoangpham95/react-native,exponent/react-native,exponent/react-native