Inquirer.js icon indicating copy to clipboard operation
Inquirer.js copied to clipboard

Do not cleanup editor when content is not valid

Open marhaupe opened this issue 5 years ago • 1 comments

Currently, the temporary file created by the editor prompt gets deleted whether or not the validate function returns true. Looking at the source of the external-editor module, as far as I can tell, it should be fairly easy to delay the file cleanup. Let me know if PRs are welcome for this, I'd very much like to have this functionality.

marhaupe avatar Mar 26 '20 13:03 marhaupe

Quick Update @SBoudrias: I'm currently using my own fork where I added this functionality. Let me know what I have to do before submitting a PR. As far as I can tell, I have to change the old and the new packages, which I already did. Anything else?

marhaupe avatar Apr 01 '20 12:04 marhaupe

This changed at some point, but I'm adding back an option (not default) to clear the value to keep the editor prompt feature set aligned with the input prompt. Cheers!

SBoudrias avatar Dec 07 '24 18:12 SBoudrias

Awesome! Cheers for actually getting back to me, appreciate your work.

marhaupe avatar Dec 07 '24 20:12 marhaupe