Skip to content

Commit 1c7e998

Browse files
authored
fix(config): make it clear that configure-test-app performs a reset (#2262)
1 parent 1310e8b commit 1c7e998

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/configure.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,8 @@ export function isDestructive(packagePath, { files, oldFiles }, fs = nodefs) {
552552

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

659660
if (!force && isDestructive(packagePath, config)) {
660-
error("Destructive file operations are required.");
661-
console.log(
662-
`Re-run with ${colors.bold("--force")} if you're fine with this.`
661+
error(
662+
"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)"
663663
);
664+
const forceFlag = colors.bold("--force");
665+
console.log(`Re-run with ${forceFlag} if you're fine with this.`);
664666
return 1;
665667
}
666668

0 commit comments

Comments
 (0)