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

added --allow-empty option to not raise an error on a missing file #88

Closed
wants to merge 8 commits into from
Closed

Conversation

akatov
Copy link
Contributor

@akatov akatov commented Aug 15, 2013

useful if a file name depends on an environment variable:

fresh-options --file=~/.my-file --allow-empty
  fresh config/my-file/default
  fresh config/my-file/$PROFILE
fresh-options

@jasoncodes
Copy link
Member

Thanks for your PR. I think --ignore-missing would be a better name than --allow-empty. The latter makes me think something to do with empty source files rather than the source file being missing.

This change needs test cases for both with and without --ref.

What is the intended behaviour when the only source is missing? Should an empty file be created or not? This should be covered in the tests.

@akatov
Copy link
Contributor Author

akatov commented Aug 15, 2013

yeah, i was thinking of the git commit --allow-empty option, but --ignore-missing definitely sounds better. I will take a look at the tests later.
I'd say the intended behaviour for the only source missing seems should be exactly what's happening now - the file is not created at all.

@akatov
Copy link
Contributor Author

akatov commented Aug 16, 2013

btw, ever thought of doing the tests in cucmber?

@jasoncodes
Copy link
Member

Aruba looks interesting. Not really a fan of the verbosity of Cucumber though. Nor do I want a big (albeit development only) dependency.

@akatov
Copy link
Contributor Author

akatov commented Aug 16, 2013

seems to fail with --ref

@akatov
Copy link
Contributor Author

akatov commented Aug 16, 2013

works with --ref. test cases cover single files with --ref

@jasoncodes
Copy link
Member

Looking pretty good. Thanks.

I noticed there’s an extra space inside the file existence checks. That’ll bug me if not removed.

Would you mind fixing the whitespace and then squashing these commits together?

@twe4ked twe4ked closed this in 6ad89ca Aug 19, 2013
@twe4ked
Copy link
Member

twe4ked commented Aug 19, 2013

Thanks for the PR.

@twe4ked
Copy link
Member

twe4ked commented Aug 19, 2013

I've added some documentation to the wiki here.

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.

3 participants