mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 11:03:53 +08:00
refactor(@angular/cli): remove deprecated rmdirSync usage
`rmdirSync` usage can be directly replaced with `rmSync`. For additional Node.js deprecation details, see https://nodejs.org/docs/latest-v16.x/api/deprecations.html#dep0147-fsrmdirpath--recursive-true-
This commit is contained in:
parent
7ddc3fe899
commit
ea1f2cee5d
@ -8,7 +8,7 @@
|
||||
|
||||
import { isJsonObject, json } from '@angular-devkit/core';
|
||||
import { execSync, spawn } from 'child_process';
|
||||
import { existsSync, promises as fs, realpathSync, rmdirSync } from 'fs';
|
||||
import { existsSync, promises as fs, realpathSync, rmSync } from 'fs';
|
||||
import { tmpdir } from 'os';
|
||||
import { join } from 'path';
|
||||
import { satisfies, valid } from 'semver';
|
||||
@ -111,7 +111,7 @@ export class PackageManagerUtils {
|
||||
// clean up temp directory on process exit
|
||||
process.on('exit', () => {
|
||||
try {
|
||||
rmdirSync(tempPath, { recursive: true, maxRetries: 3 });
|
||||
rmSync(tempPath, { recursive: true, maxRetries: 3 });
|
||||
} catch {}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user