woj-server/internal/service/runner/deps.go
2024-03-13 20:05:00 +08:00

19 lines
382 B
Go

package runner
import (
"git.0x7f.app/WOJ/woj-server/internal/e"
"git.0x7f.app/WOJ/woj-server/pkg/file"
"path/filepath"
)
func (s *service) EnsureDeps() e.Status {
// A very SIMPLE check
full := filepath.Join(RootfsFullDir, "woj")
run := filepath.Join(RootfsRunDir, "woj")
if !file.Exist(full) || !file.Exist(run) {
return e.RunnerDepsBuildFailed
}
return e.Success
}