代码拉取完成,页面将自动刷新
//@flow
const fs = require('fs');
const modifyHook = ['pre-push', 'post-checkout', 'post-commit', 'post-merge'];
const command = `command -v git-lfs >/dev/null 2>&1`;
const message = `{ echo >&2 "\n repository is configured for Git LFS but 'git-lfs' was not found on your path. Refer to Atlaskit document https://product-fabric.atlassian.net/wiki/spaces/FBT/pages/864979766/Enabling+git-lfs+on+Atlaskit"; exit 2; }`;
const hookfiles = [];
modifyHook.forEach(hook => {
hookfiles.push(`.git/hooks/${hook}`);
});
console.log('updating hooks -', hookfiles); //eslint-disable-line no-console
hookfiles.forEach(file => {
fs.appendFileSync(file, `\n${command} || ${message} \n`);
const hook = file.split('/')[2];
const lfscmd = `\ngit lfs ${hook} "$@" `;
fs.appendFileSync(file, lfscmd);
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。