Skip to content

Commit 125acc3

Browse files
committed
fixup! docs: add AGENTS.md guide for AI agents
1 parent 2ffa5c3 commit 125acc3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎AGENTS.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ This is the source code for the Angular CLI and related build tooling. This guid
2828
- Tests in this repository only run in Bazel. **ALWAYS** use `process.env['TEST_TMPDIR']` and assert that it is set:
2929
```ts
3030
import assert from 'node:assert';
31+
import { mkdtemp } from 'node:fs/promises';
32+
import path from 'node:path';
3133

3234
const baseTmpDir = process.env['TEST_TMPDIR'];
3335
assert(baseTmpDir, 'TEST_TMPDIR is not set');
36+
const tempRoot = await mkdtemp(path.join(baseTmpDir, 'SOMETHING'));
3437
```
3538
- **NEVER** use or fallback to `os.tmpdir()`. Bazel executes tests in hermetic sandboxes and sets `TEST_TMPDIR` to an isolated, sandboxed directory. Using `os.tmpdir()` can cause sandboxing failures, permission errors, or file leakage outside the Bazel sandbox.
3639
- **Unit Tests:**

0 commit comments

Comments
 (0)