mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
Warn and make Gradle Wrapper script executable
Instead of failing the build, detect a non-executable wrapper file and set the executable bit. Fixes #17
This commit is contained in:
4
dist/setup-gradle/main/index.js
vendored
4
dist/setup-gradle/main/index.js
vendored
@@ -140722,6 +140722,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.gradleWrapperScript = exports.installScriptFilename = exports.wrapperScriptFilename = void 0;
|
||||
const core = __importStar(__nccwpck_require__(42186));
|
||||
const path = __importStar(__nccwpck_require__(71017));
|
||||
const fs_1 = __importDefault(__nccwpck_require__(57147));
|
||||
const IS_WINDOWS = process.platform === 'win32';
|
||||
@@ -140755,7 +140756,8 @@ function verifyIsExecutableScript(toExecute) {
|
||||
fs_1.default.accessSync(toExecute, fs_1.default.constants.X_OK);
|
||||
}
|
||||
catch (err) {
|
||||
throw new Error(`Gradle script '${toExecute}' is not executable.`);
|
||||
core.warning(`Gradle wrapper script '${toExecute}' is not executable. Action will set executable permission and continue.`);
|
||||
fs_1.default.chmodSync(toExecute, '755');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
dist/setup-gradle/main/index.js.map
vendored
2
dist/setup-gradle/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user