Skip to content

Commit

Permalink
fix missing prettier file (#20001)
Browse files Browse the repository at this point in the history
Summary:
fix missing prettier file
pass all current ci.
facebook/react-native#19987
 [GENERAL] [INTERNAL] [TOOL] - fix missing prettier file.
Closes facebook/react-native#20001

Differential Revision: D8714374

Pulled By: hramos

fbshipit-source-id: acdcb5d84c56d26c55f6262a0a98aefe786de8cb
  • Loading branch information
gengjiawen authored and facebook-github-bot committed Jul 2, 2018
1 parent f176b4a commit 8c8c19e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions runAndroid/runAndroid.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,7 @@ function startServerInNewWindow(port) {
const scriptFile = isWindows
? 'launchPackager.bat'
: 'launchPackager.command';
const packagerEnvFilename = isWindows
? '.packager.bat'
: '.packager.env';
const packagerEnvFilename = isWindows ? '.packager.bat' : '.packager.env';
const portExportContent = isWindows
? `set RCT_METRO_PORT=${port}`
: `export RCT_METRO_PORT=${port}`;
Expand All @@ -373,11 +371,14 @@ function startServerInNewWindow(port) {
'..',
'..',
'scripts',
packagerEnvFilename
packagerEnvFilename,
);

// ensure we overwrite file by passing the 'w' flag
fs.writeFileSync(packagerEnvFile, portExportContent, {encoding: 'utf8', flag: 'w'});
fs.writeFileSync(packagerEnvFile, portExportContent, {
encoding: 'utf8',
flag: 'w',
});

if (process.platform === 'darwin') {
if (terminal) {
Expand Down

0 comments on commit 8c8c19e

Please sign in to comment.