Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

fix: Error for non-existant rootDir should not throw for virtual fs #23

Conversation

stephan-noel
Copy link
Contributor

Description

Fix issue to allow files to not exist in virtual file system in createFileInput function.

Fixes #22

How Has This Been Tested?

Tested in a separate repo with a lifecycle hook. Verified that the bug appeared and that using my code prevented the bug. Also created a unit test.

@beshanoe I had to be restrictive with the types accepted by createFileInput. For example, it does not accept the fs export of memFS as that is just a POJO instead of a class and so runtime type-checking can't be used to branch the execution.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests to cover my changes
  • I have made corresponding changes to the documentation

Disclaimer

By sending us your contributions, you are agreeing that your contribution is made subject to the terms of our Contributor Ownership Statement

@stephan-noel stephan-noel force-pushed the fix/error-when-virtual-directory-non-existant branch from 884da8d to 76ea237 Compare October 4, 2020 12:43
@stephan-noel stephan-noel force-pushed the fix/error-when-virtual-directory-non-existant branch from 76ea237 to 72f6adc Compare October 12, 2020 19:11
@beshanoe beshanoe merged commit dc9cc65 into Farfetch:master Oct 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Garment gives an error when it tries to write in-memory
2 participants