Skip to content

Commit

Permalink
fix(config): make it clear that configure-test-app performs a reset (
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 authored Sep 30, 2024
1 parent 1310e8b commit 1c7e998
Showing 1 changed file with 6 additions and 4 deletions.
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

0 comments on commit 1c7e998

Please sign in to comment.