mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 14:13:35 +00:00 
			
		
		
		
	add trim
This commit is contained in:
		
							parent
							
								
									b166994869
								
							
						
					
					
						commit
						5ae4ffe22e
					
				
							
								
								
									
										2
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							@ -3838,7 +3838,7 @@ exports.supportedPackageManagers = {
 | 
				
			|||||||
exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true });
 | 
					    let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true });
 | 
				
			||||||
    if (exitCode) {
 | 
					    if (exitCode) {
 | 
				
			||||||
        stderr = !stderr
 | 
					        stderr = !stderr.trim()
 | 
				
			||||||
            ? `The '${toolCommand}' command failed with exit code: ${exitCode}`
 | 
					            ? `The '${toolCommand}' command failed with exit code: ${exitCode}`
 | 
				
			||||||
            : stderr;
 | 
					            : stderr;
 | 
				
			||||||
        throw new Error(stderr);
 | 
					        throw new Error(stderr);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							@ -46209,7 +46209,7 @@ exports.supportedPackageManagers = {
 | 
				
			|||||||
exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true });
 | 
					    let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true });
 | 
				
			||||||
    if (exitCode) {
 | 
					    if (exitCode) {
 | 
				
			||||||
        stderr = !stderr
 | 
					        stderr = !stderr.trim()
 | 
				
			||||||
            ? `The '${toolCommand}' command failed with exit code: ${exitCode}`
 | 
					            ? `The '${toolCommand}' command failed with exit code: ${exitCode}`
 | 
				
			||||||
            : stderr;
 | 
					            : stderr;
 | 
				
			||||||
        throw new Error(stderr);
 | 
					        throw new Error(stderr);
 | 
				
			||||||
 | 
				
			|||||||
@ -37,7 +37,7 @@ export const getCommandOutput = async (toolCommand: string) => {
 | 
				
			|||||||
  );
 | 
					  );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (exitCode) {
 | 
					  if (exitCode) {
 | 
				
			||||||
    stderr = !stderr
 | 
					    stderr = !stderr.trim()
 | 
				
			||||||
      ? `The '${toolCommand}' command failed with exit code: ${exitCode}`
 | 
					      ? `The '${toolCommand}' command failed with exit code: ${exitCode}`
 | 
				
			||||||
      : stderr;
 | 
					      : stderr;
 | 
				
			||||||
    throw new Error(stderr);
 | 
					    throw new Error(stderr);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user