mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 03:23:57 +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 { isJsonObject, json } from '@angular-devkit/core';
|
||||||
import { execSync, spawn } from 'child_process';
|
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 { tmpdir } from 'os';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { satisfies, valid } from 'semver';
|
import { satisfies, valid } from 'semver';
|
||||||
@ -111,7 +111,7 @@ export class PackageManagerUtils {
|
|||||||
// clean up temp directory on process exit
|
// clean up temp directory on process exit
|
||||||
process.on('exit', () => {
|
process.on('exit', () => {
|
||||||
try {
|
try {
|
||||||
rmdirSync(tempPath, { recursive: true, maxRetries: 3 });
|
rmSync(tempPath, { recursive: true, maxRetries: 3 });
|
||||||
} catch {}
|
} catch {}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user