Skip to content

Commit 45616f1

Browse files
committed
fix(bazel): the "paths[0]" argument must be of type string. Received an instance of Buffer
Workaround for ``` TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received an instance of Buffer at Object.resolve (node:path:1101:7) at fs.readdir (internal/node/node_patches.cjs:257:44) ```
1 parent 767656c commit 45616f1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bazel/integration/test_runner/runner.mts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import fs from 'node:fs/promises';
9+
import {rmSync, promises as fs} from 'node:fs';
1010
import path from 'node:path';
1111
import os from 'node:os';
1212

@@ -88,7 +88,11 @@ export class TestRunner {
8888
// We keep the temporary directory on disk if the users wants to debug the test.
8989
if (!this.isTestDebugMode) {
9090
debug('Deleting the integration test temporary directory..');
91-
await fs.rm(testTmpDir, {force: true, recursive: true, maxRetries: 3});
91+
try {
92+
rmSync(testTmpDir, {force: true, recursive: true, maxRetries: 3});
93+
} catch (e) {
94+
console.error(`Failed to delete temporary directory: ${testTmpDir}`);
95+
}
9296
}
9397
}
9498
}

0 commit comments

Comments
 (0)