Skip to content
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 packager.sh using '.' instead of 'source'. #14040

Closed
wants to merge 1 commit into from
Closed

Run packager.sh using '.' instead of 'source'. #14040

wants to merge 1 commit into from

Conversation

sebbarg
Copy link
Contributor

@sebbarg sebbarg commented May 18, 2017

'source' is not available in all shells on Linux (e.g. dash) and will silently fail launchPackager.command when called from runAndroid.js.

react-native run-android will thus silently fail to start the developement server ('JS server').

Motivation (required)

What existing problem does the pull request solve?

When running "react-native run-android" on the below reasonably vanilla Ubuntu system, the development server / packager script fails to start. It fails because sh defaults to dash (not bash) which doesn't know the command 'source'. dot (.) does the same as source, but works in all shells.

$ uname -a
Linux dallas 4.8.0-52-generic #55~16.04.1-Ubuntu SMP Fri Apr 28 14:36:29 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ which sh
/bin/sh

$ readlink -f /bin/sh
/bin/dash

react-native-cli: 2.0.1
react-native: 0.44.0

Test Plan (required)

using 'source':

$ ps aux | grep packager
(nothing)

using '.':

ps aux | grep packager
sh /home/xxx/code/react-native/AwesomeProject/node_modules/react-native/packager/launchPackager.command
node /home/xxx/code/react-native/AwesomeProject/node_modules/react-native/packager/../local-cli/cli.js start

'source' is not available in all shells on Linux (e.g. dash) and will silently fail launchPackager.command when called from runAndroid.js.

react-native run-android will thus silently fail to start the developement server ('JS server').
@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels May 18, 2017
@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels May 19, 2017
@facebook-github-bot
Copy link
Contributor

@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot pushed a commit that referenced this pull request May 19, 2017
Summary:
'source' is not available in all shells on Linux (e.g. dash) and will silently fail launchPackager.command when called from runAndroid.js.

react-native run-android will thus silently fail to start the developement server ('JS server').

What existing problem does the pull request solve?

When running "react-native run-android" on the below reasonably vanilla Ubuntu system, the development server / packager script fails to start. It fails because sh defaults to dash (not bash) which doesn't know the command 'source'. dot (.) does the same as source, but works in all shells.

$ uname -a
Linux dallas 4.8.0-52-generic #55~16.04.1-Ubuntu SMP Fri Apr 28 14:36:29 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ which sh
/bin/sh

$ readlink -f /bin/sh
/bin/dash

react-native-cli: 2.0.1
react-native: 0.44.0

$ ps aux | grep packager
(nothing)

ps aux | grep packager
sh /home/xxx/code/react-native/AwesomeProject/node_modules/react-native/packager/launchPackager.command
node /home/xxx/code/react-native/AwesomeProject/node_modules/react-native/packager/../local-cli/cli.js start
Closes #14040

Differential Revision: D5096298

Pulled By: hramos

fbshipit-source-id: 88466e802c9bc4358840391edb37e153f0a6b1f7
@sebbarg sebbarg deleted the dot-instead-of-source branch May 20, 2017 16:11
@sebbarg sebbarg restored the dot-instead-of-source branch May 20, 2017 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants