mirror of
https://github.com/actions/setup-java.git
synced 2025-07-01 05:14:17 +00:00
Fix.
This commit is contained in:
parent
596a6da241
commit
c1a589c5b6
7078 changed files with 1882834 additions and 319 deletions
38
node_modules/husky/lib/installer/bin.js
generated
vendored
Normal file
38
node_modules/husky/lib/installer/bin.js
generated
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const chalk_1 = __importDefault(require("chalk"));
|
||||
const is_ci_1 = __importDefault(require("is-ci"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const debug_1 = __importDefault(require("../debug"));
|
||||
const _1 = require("./");
|
||||
const gitRevParse_1 = __importDefault(require("./gitRevParse"));
|
||||
// Debug
|
||||
debug_1.default(`cwd: ${process.cwd()}`);
|
||||
debug_1.default(`INIT_CWD: ${process.env.INIT_CWD}`);
|
||||
// Action can be "install" or "uninstall"
|
||||
// huskyDir is ONLY used in dev, don't use this arguments
|
||||
const [, , action, huskyDir = path_1.default.join(__dirname, '../..')] = process.argv;
|
||||
// Find Git dir
|
||||
try {
|
||||
// Show un/install message
|
||||
console.log('husky > %s git hooks', action === 'install' ? 'Setting up' : 'Uninstalling');
|
||||
// Get top level and git dir
|
||||
const { topLevel, absoluteGitDir } = gitRevParse_1.default();
|
||||
// Debug
|
||||
debug_1.default(`topLevel: ${topLevel}`);
|
||||
debug_1.default(`gitDir: ${absoluteGitDir}`);
|
||||
// Install or uninstall
|
||||
if (action === 'install') {
|
||||
_1.install(topLevel, absoluteGitDir, huskyDir, is_ci_1.default);
|
||||
}
|
||||
else {
|
||||
_1.uninstall(absoluteGitDir, huskyDir);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.log(chalk_1.default.red(error.message.trim()));
|
||||
console.log(chalk_1.default.red(`husky > Failed to ${action}`));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue