Commit a731b43
committed
fix(@angular-devkit/build-angular): fix node 16 breaking when deleting the output path
According to `rmdirSync` [1] the `recursive` option is deprecated. The
wording looks like it was changed (compared to Node LTS [2]) to not
include anything about ignoring errors on paths not existing. In the
future the call should be `rmSync(..., {..., force: true})`, but when
testing locally adding a "force" option does not restore the previous
behavior. This isn't documented to work, but since the code original
code is deprecated I was wondering if the underlying functionality was
just passing all the options `rmSync` on Node 16.
This change includes an existence check to skip deleting a non existent
directory.
closes: #21216
[1]: https://nodejs.org/api/fs.html#fs_fs_rmdirsync_path_options
[2]: https://nodejs.org/docs/latest-v14.x/api/fs.html#fs_fs_rmdirsync_path_options1 parent e2375c9 commit a731b43
File tree
1 file changed
+8
-2
lines changed- packages/angular_devkit/build_angular/src/utils
1 file changed
+8
-2
lines changedLines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
0 commit comments