mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 12:03:34 +00:00 
			
		
		
		
	feat: remove package manager name check as it will be done by corepack anyway
This commit is contained in:
		
							parent
							
								
									c7d2f5b707
								
							
						
					
					
						commit
						0565a4fc0a
					
				@ -611,11 +611,6 @@ export async function enableCorepack(input: string): Promise<void> {
 | 
				
			|||||||
  if (input.length > 0 && input !== 'false') {
 | 
					  if (input.length > 0 && input !== 'false') {
 | 
				
			||||||
    if (input !== 'true') {
 | 
					    if (input !== 'true') {
 | 
				
			||||||
      const packageManagers = input.split(' ');
 | 
					      const packageManagers = input.split(' ');
 | 
				
			||||||
      if (!packageManagers.every(pm => ['npm', 'yarn', 'pnpm'].includes(pm))) {
 | 
					 | 
				
			||||||
        throw new Error(
 | 
					 | 
				
			||||||
          `One or more of the specified package managers [ ${input} ] are not supported by corepack`
 | 
					 | 
				
			||||||
        );
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      corepackArgs.push(...packageManagers);
 | 
					      corepackArgs.push(...packageManagers);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    await exec.getExecOutput('corepack', corepackArgs, {
 | 
					    await exec.getExecOutput('corepack', corepackArgs, {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user