@@ -234,26 +234,26 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I
234234 |> List.ofSeq
235235
236236 let callback () =
237- if node.Managed then
238- notification.NodeDownloading node
239- match cache.TryGetSummary allowRemoteCache cacheEntryId with
240- | Some summary ->
241- Log.Debug ( " {NodeId} restoring '{Project}/{Target}' from {Hash} " , node.Id , node.Project , node.Target , node.TargetHash )
242- match summary.Outputs with
243- | Some outputs ->
244- let files = IO.enumerateFiles outputs
245- IO.copyFiles projectDirectory outputs files |> ignore
246- api |> Option.iter ( fun api -> api.UseArtifact node.ProjectHash node.TargetHash )
247- | _ -> ()
248- notification.NodeCompleted node TaskRequest.Restore true
249- | _ ->
250- notification.NodeCompleted node TaskRequest.Restore false
251- raiseBugError $ " Unable to download build output for {cacheEntryId} for node {node.Id} "
252- else
253- Log.Debug ( " {NodeId} skipping restore '{Project}/{Target}' from {Hash} " , node.Id , node.Project , node.Target , node.TargetHash )
254-
255- let restorable = Restorable ( callback , dependencies )
256- restorables.TryAdd ( node.Id, restorable ) |> ignore
237+ notification.NodeDownloading node
238+ match cache.TryGetSummary allowRemoteCache cacheEntryId with
239+ | Some summary ->
240+ Log.Debug ( " {NodeId} restoring '{Project}/{Target}' from {Hash} " , node.Id , node.Project , node.Target , node.TargetHash )
241+ match summary.Outputs with
242+ | Some outputs ->
243+ let files = IO.enumerateFiles outputs
244+ IO.copyFiles projectDirectory outputs files |> ignore
245+ api |> Option.iter ( fun api -> api.UseArtifact node.ProjectHash node.TargetHash )
246+ | _ -> ( )
247+ notification.NodeCompleted node TaskRequest.Restore true
248+ | _ ->
249+ notification.NodeCompleted node TaskRequest.Restore false
250+ raiseBugError $ " Unable to download build output for {cacheEntryId} for node {node.Id} "
251+
252+ if node.Managed then
253+ let restorable = Restorable ( callback , dependencies )
254+ restorables.TryAdd ( node.Id , restorable ) |> ignore
255+ else
256+ Log.Debug ( " {NodeId} skipping restore '{Project}/{Target}' from {Hash} " , node.Id, node.Project , node.Target , node.TargetHash )
257257 if summary.IsSuccessful then TaskStatus.Success summary.EndedAt
258258 else TaskStatus.Failure ( summary.EndedAt, $" Restored node {node.Id} with a build in failure state" )
259259 | _ ->
0 commit comments