Mount host repositories for Docker execution with host user ownership
This commit is contained in:
@@ -63,11 +63,11 @@ func (r *runner) start(request protocol.Message, retryOf ...int64) (*protocol.Ru
|
||||
}
|
||||
selected, err := filepath.EvalSymlinks(request.Workspace)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("run workspace is unavailable")
|
||||
return nil, fmt.Errorf("run workspace is unavailable on the execution server: %q: %w; for Docker, mount this host directory at the same absolute path and use its owner's UID/GID", request.Workspace, err)
|
||||
}
|
||||
info, err := os.Stat(selected)
|
||||
if err != nil || !info.IsDir() {
|
||||
return nil, fmt.Errorf("run workspace must be a directory")
|
||||
return nil, fmt.Errorf("run workspace %q must be an accessible directory on the execution server", request.Workspace)
|
||||
}
|
||||
workspace = selected
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user