2022-10-22 17:38:39 +08:00
|
|
|
package runner
|
|
|
|
|
|
|
|
import (
|
2023-07-14 21:47:11 +08:00
|
|
|
"git.0x7f.app/WOJ/woj-server/internal/e"
|
2024-01-06 16:06:16 +08:00
|
|
|
"git.0x7f.app/WOJ/woj-server/pkg/file"
|
2022-10-22 17:38:39 +08:00
|
|
|
"path/filepath"
|
|
|
|
)
|
|
|
|
|
2024-01-28 21:51:16 +08:00
|
|
|
func (s *service) EnsureDeps() e.Status {
|
2024-03-13 20:03:12 +08:00
|
|
|
// A very SIMPLE check
|
|
|
|
full := filepath.Join(RootfsFullDir, "woj")
|
|
|
|
run := filepath.Join(RootfsRunDir, "woj")
|
|
|
|
if !file.Exist(full) || !file.Exist(run) {
|
2022-10-22 17:38:39 +08:00
|
|
|
return e.RunnerDepsBuildFailed
|
|
|
|
}
|
|
|
|
|
|
|
|
return e.Success
|
|
|
|
}
|