Skip to content

Commit c9006c1

Browse files
authored
Avoid use of rmdir
This is a deprecated method on node v16.
1 parent ccf479d commit c9006c1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/analyze.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as path from "path";
33

44
import * as toolrunner from "@actions/exec/lib/toolrunner";
55
import * as yaml from "js-yaml";
6+
import del from 'del';
67

78
import * as analysisPaths from "./analysis-paths";
89
import {
@@ -435,13 +436,8 @@ export async function runFinalize(
435436
delete process.env[sharedEnv.ODASA_TRACER_CONFIGURATION];
436437
}
437438

438-
// After switching to Node16, this entire block can be replaced with `await fs.promises.rm(outputDir, { recursive: true, force: true });`.
439439
try {
440-
await fs.promises.rmdir(outputDir, {
441-
recursive: true,
442-
maxRetries: 5,
443-
retryDelay: 2000,
444-
} as any);
440+
await del(outputDir, { force: true });
445441
} catch (error: any) {
446442
if (error?.code !== "ENOENT") {
447443
throw error;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy