mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use fs.cpSync instead of execSync('cp ... (#43368)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43368 This diff replaces direct invocation of the `cp` command with the platform agnostic `fs.cpSync`. Changelog: [Internal] Reviewed By: huntie Differential Revision: D54634108 fbshipit-source-id: 41fe7b44b6534026ef1b930da85725bf3eb1e7bb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f7bbaffdc3
commit
ff03b149e7
@@ -465,8 +465,7 @@ function generateCode(outputPath, schemaInfo, includesGeneratedCode, platform) {
|
||||
const outputDir =
|
||||
reactNativeCoreLibraryOutputPath(libraryName, platform) ?? outputPath;
|
||||
fs.mkdirSync(outputDir, {recursive: true});
|
||||
// TODO: Fix this. This will not work on Windows.
|
||||
execSync(`cp -R ${tmpOutputDir}/* "${outputDir}"`);
|
||||
fs.cpSync(tmpOutputDir, outputDir, {recursive: true});
|
||||
console.log(`[Codegen] Generated artifacts: ${outputDir}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user