fix: nil schema panic (#1648)

This commit is contained in:
Pete Davison
2024-05-12 20:25:54 +01:00
committed by GitHub
parent ced3e7a579
commit f5c7472f64
3 changed files with 20 additions and 6 deletions

View File

@@ -95,6 +95,15 @@ func TestEmptyTask(t *testing.T) {
require.NoError(t, e.Run(context.Background(), &ast.Call{Task: "default"}))
}
func TestEmptyTaskfile(t *testing.T) {
e := &task.Executor{
Dir: "testdata/empty_taskfile",
Stdout: io.Discard,
Stderr: io.Discard,
}
require.Error(t, e.Setup(), "e.Setup()")
}
func TestEnv(t *testing.T) {
tt := fileContentTest{
Dir: "testdata/env",