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

fix: replace launchPackager.sh with launchPackager.command #1895

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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