Allow bot assignment for subdirectories of project mount
This commit is contained in:
parent
95efd907fb
commit
8a5d9e8518
|
|
@ -71,10 +71,15 @@ func (s *Supervisor) assignWork() {
|
|||
}
|
||||
botCwd := sess.Metadata().Cwd
|
||||
|
||||
// Find a claimable task in this bot's project (matching cwd)
|
||||
// Find a claimable task in this bot's project (matching cwd or subdirectory)
|
||||
for _, bead := range claimable {
|
||||
taskCwd, ok := bead["cwd"].(string)
|
||||
if !ok || taskCwd != botCwd {
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
rel, err := filepath.Rel(taskCwd, botCwd)
|
||||
if err != nil || (rel != "." && filepath.IsAbs(rel)) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in New Issue