Skip to content

Commit

Permalink
fix postinstall in new project
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaDiachenko committed Nov 26, 2024
1 parent f4ce762 commit ac3e642
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/template-starter/scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const {
logError,
RnvFileName,
fsExistsSync,
fsMkdirSync,
fsReadFileSync,
removeDirSync,
revertOverrideToOriginal,
Expand Down Expand Up @@ -40,7 +41,11 @@ const RNV_HOME_DIR = path.join(__dirname, '..');
})();

const resetOverrides = async () => {
const overrideDir = path.join(process.cwd(), '.rnv', 'overrides');
const rnvFolder = path.join(process.cwd(), '.rnv');
if (!fsExistsSync(rnvFolder)) {
fsMkdirSync(rnvFolder);
}
const overrideDir = path.join(rnvFolder, 'overrides');

const appliedOverrideFilePath = path.join(overrideDir, RnvFileName.appliedOverride);

Expand Down

0 comments on commit ac3e642

Please sign in to comment.