mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 01:47:13 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			266 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			266 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 'use strict';
 | |
| 
 | |
| const execa = require('execa');
 | |
| 
 | |
| module.exports = async function hasYarn() {
 | |
|   try {
 | |
|     const { exitCode } = await execa.commandSync('yarn --version', { shell: true });
 | |
| 
 | |
|     if (exitCode === 0) return true;
 | |
|   } catch (err) {
 | |
|     return false;
 | |
|   }
 | |
| };
 | 
