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

Add possibility to have git repo root dir and gulpfile in different folders #73

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

georg-malahov
Copy link

Refer to this issue

When .git and gulpfile are in different folders guppy.src and guppy.stream return empty arrays of related files.

Fixed.

…t dir not in the same folder

Require process.env.GITDIR variable to have path to .git parent folder.

Refer therealklanni#41
Needed to prevent npm from complaining `No version provided` when installing package by url.
var stripBom = require('strip-bom');
var map = require('map-stream');
var hookArgs = process.env.HOOK_ARGS ? process.env.HOOK_ARGS.split('\u263a') : [];

function getIndexed() {
return _.compact(execSync('git diff --cached --name-only --diff-filter=ACM', {
var gitParentDir = process.env.GITDIR || process.cwd();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's avoid using env vars to control this. See this comment.

In summary, I'd rather see this done using a package that can automatically determine the project/app root.

@therealklanni
Copy link
Owner

Thanks very much for your contribution. There are a couple things I would like changed before I can accept this PR, however.

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

Successfully merging this pull request may close these issues.

None yet

2 participants