-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
deleteOutputPath
option should delete the contents and not the directory itself
#10856
Comments
I just tried setting https://nx.dev/packages/node/executors/webpack#deleteoutputpath the output path is still deleted when building this project :( |
I can confirm that setting
The output folder still gets deleted. This behavior also causes a problem with docker volume mount on Linux machine. When the folder is deleted, the mounted volume is lost even if the same folder is recreated. It's not an issue on Mac OS. |
Or you get fun failures like |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
@nrwl/node:webpack
executor deletes the output folder before execution. This is due todeleteOutputPath
option being set totrue
by default.Any target using
@nrwl/workspace:run-commands
executor with thecwd
option set to the output path and one of the commands set to the target using@nrwl/node:webpack
executor fails. The failure is because@nrwl/workspace:run-commands
tries to run commands in a deleted folder.Expected Behavior
I am proposing that the
deleteOutputPath
option delete the contents of the output folder and not the folder itself.Steps to Reproduce
Reproduced in nrwl/nx-examples#207
Steps mentioned in the PR itself
Failure Logs
Environment
The text was updated successfully, but these errors were encountered: