Use rm over deprecated rmdir

this was officially deprecated in v16

```
(node:23073) [DEP0147] DeprecationWarning: In future versions of
Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use
fs.rm(path, { recursive: true }) instead
```

https://nodejs.org/api/deprecations.html#DEP0147

Signed-off-by: jbpratt <jbpratt78@gmail.com>
This commit is contained in:
jbpratt 2024-03-21 01:58:58 -05:00
parent 5ed88d269c
commit 97d8036f26
No known key found for this signature in database
GPG key ID: 07065C2AE3EF797D

View file

@ -417,7 +417,7 @@ async function removeDockerPodmanImageStroage(): Promise<void> {
await getPodmanPath(),
[ ...dockerPodmanOpts, "rmi", "-a", "-f" ]
);
await fs.promises.rmdir(dockerPodmanRoot, { recursive: true });
await fs.promises.rm(dockerPodmanRoot, { recursive: true });
}
catch (err) {
core.warning(`Failed to remove podman image stroage ${dockerPodmanRoot}: ${err}`);