Use descriptive variables to improve readability (#3318)
This commit is contained in:
		
							parent
							
								
									23b64794a4
								
							
						
					
					
						commit
						be52779bbc
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		
							
								
								
									
										11
									
								
								src/index.ts
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								src/index.ts
									
										
									
									
									
								
							| 
						 | 
					@ -103,6 +103,10 @@ async function workerMain() {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const runningNodejsVersion = process.version.slice(1).split('.').map(x => parseInt(x, 10));
 | 
				
			||||||
 | 
					const requiredNodejsVersion = [10, 0, 0];
 | 
				
			||||||
 | 
					const satisfyNodejsVersion = !lessThan(runningNodejsVersion, requiredNodejsVersion);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Init app
 | 
					 * Init app
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
| 
						 | 
					@ -110,9 +114,10 @@ async function init(): Promise<Config> {
 | 
				
			||||||
	Logger.info('Welcome to Misskey!');
 | 
						Logger.info('Welcome to Misskey!');
 | 
				
			||||||
	Logger.info(`<<< Misskey v${pkg.version} >>>`);
 | 
						Logger.info(`<<< Misskey v${pkg.version} >>>`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	new Logger('Nodejs').info(`Version ${process.version}`);
 | 
						new Logger('Nodejs').info(`Version ${runningNodejsVersion.join('.')}`);
 | 
				
			||||||
	if (lessThan(process.version.slice(1).split('.').map(x => parseInt(x, 10)), [10, 0, 0])) {
 | 
					
 | 
				
			||||||
		new Logger('Nodejs').error(`Node.js version is less than 10.0.0. Please upgrade it.`);
 | 
						if (!satisfyNodejsVersion) {
 | 
				
			||||||
 | 
							new Logger('Nodejs').error(`Node.js version is less than ${requiredNodejsVersion.join('.')}. Please upgrade it.`);
 | 
				
			||||||
		process.exit(1);
 | 
							process.exit(1);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue