Skip to content

Commit

Permalink
Bugfix for Microsoft.Spark.Extensions.DotNet.Interactive duplicate fi…
Browse files Browse the repository at this point in the history
…le exception (#565)
  • Loading branch information
suhsteve committed Jun 23, 2020
1 parent 0f576e5 commit 0879fd1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public Task OnLoadAsync(IKernel kernel)

kernelBase.AddMiddleware(async (command, context, next) =>
{
await next(command, context);
if ((context.HandlingKernel is CSharpKernel kernel) &&
(command is SubmitCode) &&
TryGetSparkSession(out SparkSession sparkSession) &&
Expand All @@ -57,8 +59,6 @@ public Task OnLoadAsync(IKernel kernel)
sparkSession.SparkContext.AddFile(filePath);
}
}
await next(command, context);
});
}

Expand Down

0 comments on commit 0879fd1

Please sign in to comment.