Skip to content

Commit

Permalink
Merge pull request #488 from toxik/fix/script-task
Browse files Browse the repository at this point in the history
Fix the `ScriptProcessExecutor` to honor the `await` property
  • Loading branch information
cdavernas authored Jan 23, 2025
2 parents 9a5fc4d + b780dc1 commit 2e23c25
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2024-Present The Synapse Authors
// Copyright © 2024-Present The Synapse Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"),
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -69,7 +69,7 @@ protected override async Task DoExecuteAsync(CancellationToken cancellationToken
? null
: await this.ProcessDefinition.Environment.ToAsyncEnumerable().ToDictionaryAwaitAsync(kvp => ValueTask.FromResult(kvp.Key), async kvp => (await this.EvaluateAndSerializeAsync(kvp.Value, cancellationToken).ConfigureAwait(false))!, cancellationToken).ConfigureAwait(false);
var process = await executor.ExecuteAsync(script, arguments, environment, cancellationToken).ConfigureAwait(false);
if (this.Task.Definition.Run.Await != false)
if (this.Task.Definition.Run.Await == false)
{
await this.SetResultAsync(new(), this.Task.Definition.Then, cancellationToken).ConfigureAwait(false);
return;
Expand Down

0 comments on commit 2e23c25

Please sign in to comment.