Skip to content

Commit 66110a4

Browse files
authored
Merge pull request #1131 from rumpl/fix-run-secret-provider
Return the /run/secrets as is
2 parents c79a4af + a8426ed commit 66110a4

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

pkg/environment/secrets.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"log/slog"
66
"os"
7-
"strings"
87

98
"github.com/docker/cagent/pkg/path"
109
)
@@ -38,5 +37,5 @@ func (p *RunSecretsProvider) Get(_ context.Context, name string) string {
3837
return ""
3938
}
4039

41-
return strings.Split(string(buf), "\n")[0]
40+
return string(buf)
4241
}

pkg/environment/secrets_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ func TestRunSecretsProvider(t *testing.T) {
4646
writer: writeNothing(),
4747
expected: "",
4848
},
49-
{
50-
name: "ignore new lines",
51-
key: "KEY",
52-
writer: writeSecret("VALUE\n\n"),
53-
expected: "VALUE",
54-
},
5549
}
5650

5751
for _, test := range tests {

0 commit comments

Comments
 (0)