File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/create-react-native-library/src Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ const NATIVE_COMMON_FILES = path.resolve(
2121 '../templates/native-common'
2222) ;
2323
24+ const FALLBACK_BOB_VERSION = '0.18.0' ;
25+
2426// Java
2527const JAVA_FILES = ( moduleType : ModuleType ) => {
2628 switch ( moduleType ) {
@@ -324,7 +326,7 @@ async function create(argv: yargs.Arguments<any>) {
324326 try {
325327 version = await Promise . race ( [
326328 new Promise < string > ( ( resolve ) =>
327- setTimeout ( ( ) => resolve ( version ) , 1000 )
329+ setTimeout ( ( ) => resolve ( FALLBACK_BOB_VERSION ) , 1000 )
328330 ) ,
329331 new Promise < string > ( ( resolve , reject ) => {
330332 const npm = spawn ( 'npm' , [
@@ -341,12 +343,12 @@ async function create(argv: yargs.Arguments<any>) {
341343 ] ) ;
342344 } catch ( e ) {
343345 // Fallback to a known version if we couldn't fetch
344- version = '0.18.0' ;
346+ version = FALLBACK_BOB_VERSION ;
345347 }
346348
347349 const options = {
348350 bob : {
349- version,
351+ version : version || FALLBACK_BOB_VERSION ,
350352 } ,
351353 project : {
352354 slug,
You can’t perform that action at this time.
0 commit comments