Comments (1)
Hi @SunilDSK,
I don't see it as a bug since I didn't fully understand what do you expect Husky does for you?
if you wanna prevent commits if appsettings.Development.json
is staged I would suggest to use the task-runner
instead.
something like:
e.g pre-commit file
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
dotnet husky run -v --group "pre-commit"
task-runner.json
{
"tasks": [
{
"name": "Verify staged files",
"group": "pre-commit",
"include": "appsettings.Development.json",
"command": "cmd",
"args": ["/c", "git reset appsettings.Development.json & exit 1", "${staged}"]
}
]
}
This would automatically unstage the appsettings.Development.json
file if it is staged and prevent the commits including this file.
also using taks-runner makes your console log prettier :)
from husky.net.
Related Issues (20)
- not working on repos that haven't run dotnet husky install HOT 2
- Support install not in .git root HOT 4
- Add an option to specify git path HOT 1
- Using 'husky attach' inside multi-project solutions leads to compile errors due to 'husky install' running multiple times HOT 6
- dotnet husky install fails if .git folder is in the parent folder of the #C project HOT 2
- Support .NET 7.0 HOT 1
- Husky exec can't find file or assembly in cache HOT 6
- dotnet husky attach cause unnecessary changes HOT 1
- Doesn't support the dotnet tools (e.g jb) HOT 3
- husky install fails when project is a submodule HOT 9
- bash exit 1 doesn't work HOT 4
- Unexpected parameter(s) error with ${staged} variable HOT 6
- Can not find task-runner.json when running dotnet husky run on Windows HOT 9
- fatal: cannot run .husky/pre-commit: No such file or directory on Mac-os HOT 7
- error in dotnet husky install HOT 8
- Chunks tasks can't load csx files in parallel. HOT 2
- commit-lint.csx not working HOT 2
- Husky throws an ArgumentException when I try to commit through Sourcetree HOT 5
- Customize Staged variable separator HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from husky.net.