From c49c5fe5bd00a483c6f9b9a528f366dfc9fd0117 Mon Sep 17 00:00:00 2001 From: Celian Raimbault Date: Mon, 16 Dec 2024 17:28:52 +0100 Subject: [PATCH] Fixed bug --- components/command/runner.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/command/runner.go b/components/command/runner.go index f5ac7a597..01d5737d6 100644 --- a/components/command/runner.go +++ b/components/command/runner.go @@ -176,10 +176,10 @@ func (r *RemoteRunner) Command(name string, args *Args, opts ...pulumi.ResourceO cmd, err := remote.NewCommand(r.e.Ctx(), r.namer.ResourceName("cmd", name), args.toRemoteCommandArgs(r.config, r.osCommand), utils.MergeOptions(r.options, opts...)...) if err != nil { - return &RemoteCommand{cmd}, nil + return nil, err } - return nil, err + return &RemoteCommand{cmd}, nil } func (r *RemoteRunner) NewCopyFile(name string, localPath, remotePath pulumi.StringInput, opts ...pulumi.ResourceOption) (pulumi.Resource, error) { @@ -236,10 +236,10 @@ func (r *LocalRunner) Command(name string, args *Args, opts ...pulumi.ResourceOp cmd, err := local.NewCommand(r.e.Ctx(), r.namer.ResourceName("cmd", name), args.toLocalCommandArgs(r.config, r.osCommand), opts...) if err != nil { - return &LocalCommand{cmd}, nil + return nil, err } - return nil, err + return &LocalCommand{cmd}, nil } func (r *LocalRunner) NewCopyFile(name string, localPath, remotePath pulumi.StringInput, opts ...pulumi.ResourceOption) (pulumi.Resource, error) {