Comments (6)
null
I think? Probably same as if you're not in a git repository.
from git-rev-sync-js.
@kurttheviking I also believe this package should have a feature (or default) to return null
instead of throwing the following errors (or any other error related to git not being fully initialized).
Error: [git-rev-sync] no git repository found
Error: ENOENT: no such file or directory
from git-rev-sync-js.
yeah; that's a known issue that I haven't found a solid "fix" for yet -- do you have any ideas? if so, would you like to submit a PR?
from git-rev-sync-js.
wrap in a try/catch and check for ENOENT?
from git-rev-sync-js.
@daurnimator maybe; but what's expected? return null
or an empty string?
from git-rev-sync-js.
https://github.com/NiceLabs/git-rev
Support empty-repository
from git-rev-sync-js.
Related Issues (20)
- Add --first-parent to tag() HOT 5
- Not a git repository HOT 1
- refactor for node 6+ HOT 5
- Add check for uncommitted changes HOT 1
- Discrepancy in length of short hash
- How to specify short hash length example? HOT 1
- Strange behavior of isDirty HOT 1
- "[git-rev-sync] no git repository found" when working with `git --work-tree` HOT 3
- Request to add support to calculate the distance from current commit to latest tag HOT 1
- Change length of the short hash HOT 1
- getting last tag HOT 1
- Need to update version of dependency shelljs to version 1.0.0 HOT 2
- Shelljs deletes OLDPWD env variable which creates error with webpack
- I got vulnerable dependencies issue in latest version 3.0.1 HOT 2
- Improper Privilege Management vulnerability in shelljs package HOT 2
- Vulnerability issue in shelljs HOT 1
- long() throws an exception when running in a worktree on windows HOT 1
- Error when using git.short and git.branch HOT 5
- How to get tag output like: 3.5.3-18-dirty ? 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 git-rev-sync-js.