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

Use fileExists in replace_hermes script #37911

Closed
wants to merge 1 commit into from
Closed
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 @@ -34,15 +34,17 @@ function shouldReplaceHermesConfiguration(configuration) {
console.log(`Found ${LAST_BUILD_FILENAME} file`);
const oldConfiguration = fs.readFileSync(LAST_BUILD_FILENAME).toString();
if (oldConfiguration === configuration) {
console.log('No need to download a new build of Hermes!');
console.log(
'Same config of the previous build. No need to replace Hermes engine',
);
return false;
}
}

// Assumption: if there is no stored last build, we assume that it was build for debug.
if (!fs.existsSync && configuration === 'Debug') {
if (!fileExists && configuration === 'Debug') {
console.log(
'File does not exists, but Debug configuration. No need to download a new build of Hermes!',
'No previous build detected, but Debug Configuration. No need to replace Hermes engine',
);
return false;
}
Expand Down