Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
julienp committed Dec 4, 2024
1 parent c07a146 commit 60c39d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/pulumiyaml/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@ func (e *programEvaluator) evaluateBuiltinInvoke(t *ast.InvokeExpr) (interface{}
e.error(t.CallOpts.Version, fmt.Sprintf("unable to parse function provider version: %v", err))
return nil, true
}
_, functionName, err := ResolveFunction(context.TODO(), e.pkgLoader, e.packageDescriptors, t.Token.Value, version)
_, functionName, err := ResolveFunction(e.pulumiCtx.Context(), e.pkgLoader, e.packageDescriptors, t.Token.Value, version)
if err != nil {
return e.error(t, err.Error())
}
Expand All @@ -2043,7 +2043,7 @@ func (e *programEvaluator) evaluateBuiltinInvoke(t *ast.InvokeExpr) (interface{}
}

if t.Return.GetValue() == "" {
output := pulumi.OutputWithDependencies(context.TODO(), pulumi.Any(result), deps...)
output := pulumi.OutputWithDependencies(e.pulumiCtx.Context(), pulumi.Any(result), deps...)
if secret {
return pulumi.ToSecret(output), true
}
Expand All @@ -2056,7 +2056,7 @@ func (e *programEvaluator) evaluateBuiltinInvoke(t *ast.InvokeExpr) (interface{}
return e.error(t.Return, fmt.Sprintf("fn::invoke of %s did not contain a property '%s' in the returned value", t.Token.Value, t.Return.Value))
}

output := pulumi.OutputWithDependencies(context.TODO(), pulumi.Any(retv), deps...)
output := pulumi.OutputWithDependencies(e.pulumiCtx.Context(), pulumi.Any(retv), deps...)
if secret {
return pulumi.ToSecret(output), true
}
Expand Down

0 comments on commit 60c39d6

Please sign in to comment.