MCPcopy Index your code
hub / github.com/go-task/task / setupDirs

Function setupDirs

taskrc/taskrc_test.go:35–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33)
34
35func setupDirs(t *testing.T) (string, string, string) {
36 t.Helper()
37
38 xdgConfigDir := t.TempDir()
39 xdgTaskConfigDir := filepath.Join(xdgConfigDir, "task")
40 require.NoError(t, os.Mkdir(xdgTaskConfigDir, 0o755))
41
42 homeDir := t.TempDir()
43
44 localDir := filepath.Join(homeDir, "local")
45 require.NoError(t, os.Mkdir(localDir, 0o755))
46
47 t.Setenv("XDG_CONFIG_HOME", xdgConfigDir)
48 t.Setenv("HOME", homeDir)
49
50 return xdgTaskConfigDir, homeDir, localDir
51}
52
53func writeFile(t *testing.T, dir, filename, content string) {
54 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…