Skip to content

change copy_file function to raise an error when trying to copy non-existing file#3836

Merged
boegel merged 9 commits intoeasybuilders:developfrom
nordmoen:ensure_path_exist_copy_file
Sep 21, 2021
Merged

change copy_file function to raise an error when trying to copy non-existing file#3836
boegel merged 9 commits intoeasybuilders:developfrom
nordmoen:ensure_path_exist_copy_file

Conversation

@nordmoen
Copy link
Copy Markdown
Contributor

Previous behavior would simply skip copying a file if it did not exist
and report copy success. This commit changes that behavior to error out
early if the file does not exist and explicitly warn if trying to copy
something that is neither a file nor a symbolic link.

Jørgen Nordmoen added 2 commits September 15, 2021 08:57
Previous behavior would simply skip copying a file if it did not exist
and report copy success. This commit changes that behavior to error out
early if the file does not exist and explicitly warn if trying to copy
something that is neither a file nor a symbolic link.
Previous intention is simply to let the error bubble up if the copy
tries to affect a directory.
Comment thread easybuild/tools/filetools.py Outdated
@easybuilders easybuilders deleted a comment from boegelbot Sep 15, 2021
@boegel boegel changed the title Explicitly check if a file exist when copying change copy_fie function: raise error when trying to copy non-existing file Sep 15, 2021
@boegel boegel added this to the next release (4.5.0?) milestone Sep 15, 2021
@boegel
Copy link
Copy Markdown
Member

boegel commented Sep 15, 2021

@nordmoen Are you up for extending the test_copy_file we have in test/framework/filetools.py to verify the behavior when trying to copy a non-existing file?

@boegel boegel changed the title change copy_fie function: raise error when trying to copy non-existing file change copy_fie function to raise an error when trying to copy non-existing file Sep 15, 2021
@nordmoen
Copy link
Copy Markdown
Contributor Author

@nordmoen Are you up for extending the test_copy_file we have in test/framework/filetools.py to verify the behavior when trying to copy a non-existing file?

Should be able to, yes

@boegel boegel changed the title change copy_fie function to raise an error when trying to copy non-existing file change copy_file function to raise an error when trying to copy non-existing file Sep 15, 2021
@nordmoen nordmoen requested a review from boegel September 16, 2021 07:16
Comment thread easybuild/tools/filetools.py Outdated
@easybuilders easybuilders deleted a comment from boegelbot Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants