Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
git-hook-pure
Advanced tools
Readme
You needn't bootstrap nodejs in every git hook
yarn add git-hook-pure -D
# or
npm install git-hook-pure --save-dev
Will create a folder .githooks
in the same level as .git
. And append code to all git hooks in .git/hooks
.
You can put an executable file in .githooks/
or .githooks/[hookName]/
.
The file under .githooks/
will be executed in all git hook and called by /path/to/hook-file [hook name] [...git hook arguments]
.
The file under .githooks/[hookName]/
will be executed in specified git hook and called by /path/to/hook-file [...git hook arguments]
.
bash -c "$(curl -fsSL https://raw.githubusercontent.com/bolasblack/git-hook-pure/master/install.sh)"
git lfs need install some git hook, you can run git lfs update -m
to get hook scripts and put them in .githooks
.
For example you can put lfs script .git/hooks/pre-push
into .githooks/pre-push/git-lfs
.
Or you can put script
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .githooks/git-lfs.\n"; exit 2; }
if [ \
$1 = "pre-push" -o \
$1 = "post-checkout" -o \
$1 = "post-commit" -o \
$1 = "post-merge" -o \
! t ] ; then
git lfs "$@" || exit
fi
exit 0
into .githooks/git-lfs
git-hook-template.sh
Change npm script to:
{
// ...
"scripts": {
"postinstall": "./node_modules/git-hook-pure/git-hook-pure.sh install /the/path/to/template/file"
}
}
npm install
You can use the environment variable GIT_HOOK_PURE_SKIP_INSTALL=1
to avoid the running of the install scripts.
pnpm
v7.npmrc
: echo side-effects-cache=false > .npmrc
rm -f node_modules/.pnpm/lock.yaml && pnpm install
git-hook-pure
only: https://github.com/pnpm/pnpm/issues/5002FAQs
git hook more freely and quickly
The npm package git-hook-pure receives a total of 5 weekly downloads. As such, git-hook-pure popularity was classified as not popular.
We found that git-hook-pure demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.