Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have to manually change current working directory #24

Open
epsil opened this issue Aug 28, 2017 · 1 comment
Open

Have to manually change current working directory #24

epsil opened this issue Aug 28, 2017 · 1 comment

Comments

@epsil
Copy link

epsil commented Aug 28, 2017

I currently use git-rev as follows:

process.chdir(__dirname)
git.short(function (str) {
  // ...
})

But isn't the first line redundant? In the beginning of git-rev's index.js file, there is this:

exec(cmd, { cwd: __dirname }, function (...) { ... })

So git-rev should automatically take care of changing the current working directory. However, if I simplify my code:

git.short(function (str) {
  // ...
})

Then it doesn't work unless I already am in the correct directory.

@epsil
Copy link
Author

epsil commented Aug 28, 2017

Hang on. It turns out that the version in my node_modules/ folder (which I got via npm) is really old -- the latest version was published 5 years ago.

Duplicate of #7, then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant