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

Remove the --cwd option and introduce smarter cwd-resolver #1

Closed
pomek opened this issue Jan 12, 2017 · 2 comments · Fixed by #77
Closed

Remove the --cwd option and introduce smarter cwd-resolver #1

pomek opened this issue Jan 12, 2017 · 2 comments · Fixed by #77

Comments

@pomek
Copy link
Member

pomek commented Jan 12, 2017

At this moment, a user can provide the --cwd value. This does not make sense.

The cwd should indicate on the directory which contains the configuration (mgit.json) file.

cwd-resolver module looks like:

module.exports = function cwdResolver() {
	return process.cwd();
};

It should be smarter and finds the mgit.json file. If the file was not found then goes one level up and tries to find the file once again. After n attempts, it should throw an error - "The configuration file cannot be found." or something like that.

@Reinmar
Copy link
Member

Reinmar commented Jan 24, 2017

The cwd option was already removed. Now we need a smarter resolver which scans dir tree up for mgit.json or package.json (once we'll support configuration through package.json).

@Reinmar
Copy link
Member

Reinmar commented Feb 6, 2018

DUP reported in #71

cc @adelura

@pomek pomek self-assigned this Apr 25, 2018
Reinmar added a commit that referenced this issue May 4, 2018
Feature: Introduced a smarter `cwd` resolver which scans directory tree up in order to find the `mgit.json` file. If the file won't be found, an exception will be thrown. Closes #1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants