mirror of
				https://github.com/actions-rs/cargo.git
				synced 2025-11-03 22:31:58 +02:00 
			
		
		
		
	Removing bundled version of the @actions/core:info function
This commit is contained in:
		
							parent
							
								
									3357c7c844
								
							
						
					
					
						commit
						23f951744d
					
				
					 2 changed files with 3 additions and 9 deletions
				
			
		
							
								
								
									
										10
									
								
								src/main.ts
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/main.ts
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -9,19 +9,13 @@ import * as input from './input';
 | 
			
		|||
 | 
			
		||||
const CROSS_REV: string = '69b8da7da287055127812c9e4b071756c2b98545';
 | 
			
		||||
 | 
			
		||||
// TODO: `core.info` function is not published yet as for `1.0.1` version,
 | 
			
		||||
// bundling it.
 | 
			
		||||
function core_info(message: string): void {
 | 
			
		||||
    process.stdout.write(message + os.EOL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
async function getCargo(): Promise<string> {
 | 
			
		||||
    try {
 | 
			
		||||
        return await io.which('cargo', true);
 | 
			
		||||
    } catch (error) {
 | 
			
		||||
        core_info('cargo is not installed by default for some virtual environments, \
 | 
			
		||||
        core.info('cargo is not installed by default for some virtual environments, \
 | 
			
		||||
see https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions');
 | 
			
		||||
        core_info('To install it, use this action: https://github.com/actions-rs/toolchain');
 | 
			
		||||
        core.info('To install it, use this action: https://github.com/actions-rs/toolchain');
 | 
			
		||||
 | 
			
		||||
        throw error;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue