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(android): production builds crash with Node 14 #12782

Merged
merged 4 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2573,7 +2573,7 @@ AndroidBuilder.prototype.writeEnvironmentVariables = async function writeEnviron
await fs.writeFile(
envVarsFile,
// for non-development builds, DO NOT WRITE OUT ENV VARIABLES TO APP
this.writeEnvVars ? JSON.stringify(process.env) : {}
this.writeEnvVars ? JSON.stringify(process.env) : '{}'
);
this.encryptJS && this.jsFilesToEncrypt.push('_env_.json');
this.unmarkBuildDirFile(envVarsFile);
Expand Down
2 changes: 1 addition & 1 deletion iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5383,7 +5383,7 @@ iOSBuilder.prototype.writeEnvironmentVariables = async function writeEnvironment
}

// for non-development builds, DO NOT WRITE OUT ENV VARIABLES TO APP
const contents = this.writeEnvVars ? JSON.stringify(process.env) : {};
const contents = this.writeEnvVars ? JSON.stringify(process.env) : '{}';
if (!fs.existsSync(envVarsFile) || contents !== fs.readFileSync(envVarsFile, 'utf8')) {
this.logger.debug(__('Writing %s', envVarsFile.cyan));

Expand Down