MCPcopy
hub / github.com/air-verse/air / chdir

Function chdir

runner/test_util.go:11–24  ·  view source on GitHub ↗
(t *testing.T, targetDir string)

Source from the content-addressed store, hash-verified

9)
10
11func chdir(t *testing.T, targetDir string) {
12 originalDir, err := os.Getwd()
13 if err != nil {
14 t.Fatalf("failed to getwd: %v", err)
15 }
16 if err := os.Chdir(targetDir); err != nil {
17 t.Fatalf("failed to change working directory: %v", err)
18 }
19 t.Cleanup(func() {
20 if err := os.Chdir(originalDir); err != nil {
21 t.Fatalf("failed to restore working directory: %v", err)
22 }
23 })
24}
25
26// waitForCondition waits for a condition to be true with fast polling.
27// Uses environment-aware timeout multiplier for CI compatibility.

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…