Skip to content

Conversation

@enigmatt-pl
Copy link

closes #571
closes #665

@enigmatt-pl enigmatt-pl changed the title Add default config in insert_into_file method Raise an exception if before and after arguments are missing Oct 1, 2019
@rafaelfranca
Copy link
Member

Thank you for the pull request. I believe if none of :after or :before are set we should just append to the end of the file.

Can you change the code and tests to do that?

#665 seems to be a different problem since :after was provided. We should add a test for that case and fix it.

@enigmatt-pl enigmatt-pl changed the title Raise an exception if before and after arguments are missing Fix TypeError when no config given and wanrn if file unchanged Oct 9, 2019
@enigmatt-pl enigmatt-pl changed the title Fix TypeError when no config given and wanrn if file unchanged Fix TypeError when no config given and warn if file unchanged Oct 9, 2019
@enigmatt-pl
Copy link
Author

Ready @rafaelfranca 😃

If no :before nor :after parameter was supplied, Thor now decides
to append the data after the last piece of information within the file.

In addition, a constant Hash with warnings has been added.
If the file is unchanged because the flag value couldn't be found,
Thor now warns the users and briefly explains what happened.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants