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(config): make it clear that configure-test-app performs a reset #2262

Merged
merged 8 commits into from
Sep 30, 2024
10 changes: 6 additions & 4 deletions scripts/configure.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ export function isDestructive(packagePath, { files, oldFiles }, fs = nodefs) {

if (modified.length > 0 || removed.length > 0) {
if (modified.length > 0) {
warn("The following files will be overwritten:");
const reset = colors.bold("reset");
warn(`The following files will be ${reset} to their original state:`);
modified.sort().forEach((file) => warn(file, " "));
}
if (removed.length > 0) {
Expand Down Expand Up @@ -657,10 +658,11 @@ export function configure(params, fs = nodefs) {
const config = gatherConfig(params);

if (!force && isDestructive(packagePath, config)) {
error("Destructive file operations are required.");
console.log(
`Re-run with ${colors.bold("--force")} if you're fine with this.`
error(
"Some files will be reset and/or removed: You may have to manually restore your own or your template's customizations to get the app working again (for more details, see https://github.com/microsoft/react-native-test-app/wiki/Updating#reconfiguringresetting-rnta)"
);
const forceFlag = colors.bold("--force");
console.log(`Re-run with ${forceFlag} if you're fine with this.`);
return 1;
}

Expand Down
Loading