-
Notifications
You must be signed in to change notification settings - Fork 1k
Conversation
function mkdirInSnapshot(path_, cb) { | ||
var cb2 = cb || rethrow; | ||
return cb2( | ||
new Error('Cannot mkdir in a snapshot. Try mountpoints instead.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better error for here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would instead change the name of the method in something more user friendly, something like mkdirThrowInSnapshot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with mkdirFailInSnapshot
because it doesn't throw if a callback is provided to the async method, but it still fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test for this?
Test added! I named it with the PR number. Let me know if it should be something different. |
Hmm, this had the same pnpm failure as #1121 |
Seems that the problem is node version, strange them were not failing before... @erossignon could you fix those tests please? |
Let me provide a patch for the pnpm issue... |
please merge #1122 first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This can be merged once check pass |
@leerob can we merge this? |
I'm working on a CLI tool that bundles some code, but then mirrors the directory structure out to the filesystem. This is done using mountpoints and this patch that allows
fs.mkdir
to apply to them.