mirror of
				https://github.com/gradle/gradle-build-action.git
				synced 2025-11-04 18:08:57 +08:00 
			
		
		
		
	
							
								
								
									
										2
									
								
								dist/main/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/main/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/main/index.js.map
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/main/index.js.map
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -14,6 +14,7 @@ export async function executeGradleBuild(executable: string | undefined, root: s
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Use the provided executable, or look for a Gradle wrapper script to run
 | 
					    // Use the provided executable, or look for a Gradle wrapper script to run
 | 
				
			||||||
    const toExecute = executable ?? gradlew.locateGradleWrapperScript(root)
 | 
					    const toExecute = executable ?? gradlew.locateGradleWrapperScript(root)
 | 
				
			||||||
 | 
					    verifyIsExecutableScript(toExecute)
 | 
				
			||||||
    const status: number = await exec.exec(toExecute, args, {
 | 
					    const status: number = await exec.exec(toExecute, args, {
 | 
				
			||||||
        cwd: root,
 | 
					        cwd: root,
 | 
				
			||||||
        ignoreReturnCode: true
 | 
					        ignoreReturnCode: true
 | 
				
			||||||
@@ -31,3 +32,11 @@ export async function executeGradleBuild(executable: string | undefined, root: s
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function verifyIsExecutableScript(toExecute: string): void {
 | 
				
			||||||
 | 
					    try {
 | 
				
			||||||
 | 
					        fs.accessSync(toExecute, fs.constants.X_OK)
 | 
				
			||||||
 | 
					    } catch (err) {
 | 
				
			||||||
 | 
					        throw new Error(`Gradle script '${toExecute}' is not executable.`)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user