Skip to content

Commit

Permalink
fix: add missing launchPackager.command (#1895)
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak authored Mar 30, 2023
1 parent 7739544 commit 371de7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export function startServerInNewWindow(
* Set up OS-specific filenames and commands
*/
const isWindows = /^win/.test(process.platform);
const scriptFile = isWindows ? 'launchPackager.bat' : 'launchPackager.sh';
const scriptFile = isWindows
? 'launchPackager.bat'
: 'launchPackager.command';
const packagerEnvFilename = isWindows ? '.packager.bat' : '.packager.env';
const packagerEnvFileExportContent = isWindows
? `set RCT_METRO_PORT=${port}\nset PROJECT_ROOT=${projectRoot}\nset REACT_NATIVE_PATH=${reactNativePath}`
Expand Down Expand Up @@ -59,8 +61,8 @@ export function startServerInNewWindow(
);
} else {
fs.copyFileSync(
path.join(cliPluginMetroPath, 'launchPackager.sh'),
path.join(nodeModulesPath, 'launchPackager.sh'),
path.join(cliPluginMetroPath, 'launchPackager.command'),
path.join(nodeModulesPath, 'launchPackager.command'),
);
}
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)

source "$THIS_DIR/.packager.env"
cd $PROJECT_ROOT
$REACT_NATIVE_PATH/cli.js start
Expand Down

0 comments on commit 371de7b

Please sign in to comment.