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

Fix copy_quizzes to use quiz_dir #82

Merged
merged 1 commit into from
Sep 29, 2021
Merged

Fix copy_quizzes to use quiz_dir #82

merged 1 commit into from
Sep 29, 2021

Conversation

cansavvy
Copy link
Contributor

Purpose/implementation Section

What changes are being implemented in this Pull Request?

This is the sequel to #80 because I reviewed it too quickly and it didn't copy the quizzes. :sad:

But now it does. I changed it to take the quiz_dir argument that a user specifies in the bookdown_to_leanpub() main function so it should inherit whatever that value is. Also added a message for if that directory isn't found.

if (length(files) > 0) {
file.copy(files, file.path(output_dir), overwrite = TRUE)
fs::file_copy(quizzes, file.path(output_dir, basename(quizzes)),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It copies over the files, ditches the directory. Is this what we want, @carriewright11 ?

Copy link
Member

Choose a reason for hiding this comment

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

yeah I think that makes sense

Copy link
Member

Choose a reason for hiding this comment

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

ah yes... good point about the directory...

@cansavvy
Copy link
Contributor Author

Now to see if the checks pass.

@cansavvy cansavvy changed the title Fix copy_quizzes Fix copy_quizzes to use quiz_dirm Sep 29, 2021
@cansavvy cansavvy changed the title Fix copy_quizzes to use quiz_dirm Fix copy_quizzes to use quiz_dir Sep 29, 2021
if (length(files) > 0) {
file.copy(files, file.path(output_dir), overwrite = TRUE)
fs::file_copy(quizzes, file.path(output_dir, basename(quizzes)),
Copy link
Member

Choose a reason for hiding this comment

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

yeah I think that makes sense

@carriewright11 carriewright11 merged commit 1fd9075 into master Sep 29, 2021
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.

2 participants