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

File contents deleted #55

Open
welchr opened this issue Jun 15, 2017 · 1 comment
Open

File contents deleted #55

welchr opened this issue Jun 15, 2017 · 1 comment

Comments

@welchr
Copy link

welchr commented Jun 15, 2017

I ran this rather naively today in a directory and noticed it copying non-markdown files to themselves, which seemed odd, so I hit CTRL+C to stop and take a look. It had deleted the contents of all files it had a chance to access before I stopped it with CTRL+C and left them with 0 filesize. Luckily the files were checked into git and I was able to retrieve them with a quick reset, but this seems like a rather scary issue.

The command I ran was:

generate-md --input . --output . --style github

The current directory had a few markdown files to convert, but subdirectories underneath had code files.

Entirely possible that I read the documentation incorrectly. In general though you probably don't want to modify existing files in the --input directory or any of its subdirectories.

@mixu
Copy link
Owner

mixu commented Jun 15, 2017

ahh good point, the intent is that the directories in --input and --output are different - e.g. rendering a git repo to a folder that will then be pushed to a s3 bucket

should add a check that --input and --output are not the same folder!

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

2 participants