Skip to content

Commit d2817f4

Browse files
BridgeARfacebook-github-bot
authored andcommitted
Use sync fs.mkdir
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> This ensures that errors are actually noticed in case it is not possible to create the directory. This will also throw an error when used with the upcoming Node.js 10.x because there is no callback. Refs: nodejs/node#18668 [CLI][MINOR][local-cli/library/library.js] - Use sync fs.mkdir for error handling <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> Closes #18084 Differential Revision: D7083122 Pulled By: shergin fbshipit-source-id: a13b64e57860e1ab2c15e0c008211dc0dca3b2d2
1 parent a534672 commit d2817f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

local-cli/library/library.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function library(argv, config, args) {
2929
const source = path.resolve('node_modules', 'react-native', 'Libraries', 'Sample');
3030

3131
if (!fs.existsSync(libraries)) {
32-
fs.mkdir(libraries);
32+
fs.mkdirSync(libraries);
3333
}
3434

3535
if (fs.existsSync(libraryDest)) {

0 commit comments

Comments
 (0)