Skip to content

Commit dc94840

Browse files
author
JT Archie
committed
fix interpolate newline character
1 parent 4be815a commit dc94840

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ can be found in [Pivotal Documentation](docs.pivotal.io/platform-automation).
8888
- If applying changes to all products, the products in `config.yml` _must be_ staged/installed.
8989
- `--config config.yml` has no product defined: succeeds.
9090
- `--config config.yml` with same products defined as what exists in Ops Manager (does not need to include all staged/installed products): succeeds.
91-
91+
- `interpolate` will no longer append a newline to end of the output
9292
## 4.8.0
9393

9494
### Features

commands/interpolate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (c Interpolate) Execute(args []string) error {
8686
return err
8787
}
8888

89-
c.logger.Println(string(bytes))
89+
c.logger.Print(string(bytes))
9090

9191
return nil
9292
}

commands/interpolate_test.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ var _ = Describe("Interpolate", func() {
9494
})
9595
Expect(err).ToNot(HaveOccurred())
9696

97-
content := logger.PrintlnArgsForCall(0)
97+
content := logger.PrintArgsForCall(0)
9898
Expect(content[0].(string)).To(MatchYAML("hello: world"))
9999
})
100100

@@ -121,7 +121,7 @@ var _ = Describe("Interpolate", func() {
121121
})
122122
Expect(err).ToNot(HaveOccurred())
123123

124-
content := logger.PrintlnArgsForCall(0)
124+
content := logger.PrintArgsForCall(0)
125125
Expect(content[0].(string)).To(MatchYAML("hello: world"))
126126
})
127127

@@ -139,7 +139,7 @@ var _ = Describe("Interpolate", func() {
139139
})
140140
Expect(err).ToNot(HaveOccurred())
141141

142-
content := logger.PrintlnArgsForCall(0)
142+
content := logger.PrintArgsForCall(0)
143143
Expect(content[0].(string)).To(MatchYAML("hello: new world"))
144144
})
145145
})
@@ -154,7 +154,7 @@ var _ = Describe("Interpolate", func() {
154154
})
155155
Expect(err).ToNot(HaveOccurred())
156156

157-
content := logger.PrintlnArgsForCall(0)
157+
content := logger.PrintArgsForCall(0)
158158
Expect(content[0].(string)).To(MatchYAML("hello: world"))
159159
})
160160

@@ -168,7 +168,7 @@ var _ = Describe("Interpolate", func() {
168168
})
169169
Expect(err).ToNot(HaveOccurred())
170170

171-
content := logger.PrintlnArgsForCall(0)
171+
content := logger.PrintArgsForCall(0)
172172
Expect(content[0].(string)).To(MatchYAML("hello: world\nworld: hello"))
173173
})
174174

@@ -183,7 +183,7 @@ var _ = Describe("Interpolate", func() {
183183
})
184184
Expect(err).ToNot(HaveOccurred())
185185

186-
content := logger.PrintlnArgsForCall(0)
186+
content := logger.PrintArgsForCall(0)
187187
Expect(content[0].(string)).To(MatchYAML("hello: otherWorld\nworld: hello"))
188188
})
189189
})
@@ -200,7 +200,7 @@ var _ = Describe("Interpolate", func() {
200200
})
201201
Expect(err).ToNot(HaveOccurred())
202202

203-
content := logger.PrintlnArgsForCall(0)
203+
content := logger.PrintArgsForCall(0)
204204
Expect(content[0].(string)).To(MatchYAML(`foo: bar
205205
hello: world`))
206206
})
@@ -219,7 +219,7 @@ hello: world`))
219219
})
220220
Expect(err).ToNot(HaveOccurred())
221221

222-
content := logger.PrintlnArgsForCall(0)
222+
content := logger.PrintArgsForCall(0)
223223
Expect(content[0].(string)).To(MatchYAML(`b`))
224224
})
225225
})
@@ -235,7 +235,7 @@ hello: world`))
235235
})
236236
Expect(err).ToNot(HaveOccurred())
237237

238-
content := logger.PrintlnArgsForCall(0)
238+
content := logger.PrintArgsForCall(0)
239239
Expect(content[0].(string)).To(MatchYAML(templateWithParameters))
240240
})
241241
})
@@ -262,7 +262,7 @@ hello: world`))
262262
It("uses stdin", func() {
263263
err := command.Execute([]string{})
264264
Expect(err).ToNot(HaveOccurred())
265-
content := logger.PrintlnArgsForCall(0)
265+
content := logger.PrintArgsForCall(0)
266266
Expect(content[0].(string)).To(MatchYAML("hello: from standard input"))
267267
})
268268
})
@@ -271,7 +271,7 @@ hello: world`))
271271
It("uses stdin", func() {
272272
err := command.Execute([]string{"--config", "-"})
273273
Expect(err).ToNot(HaveOccurred())
274-
content := logger.PrintlnArgsForCall(0)
274+
content := logger.PrintArgsForCall(0)
275275
Expect(content[0].(string)).To(MatchYAML("hello: from standard input"))
276276
})
277277
})
@@ -285,7 +285,7 @@ hello: world`))
285285
})
286286
Expect(err).ToNot(HaveOccurred())
287287

288-
content := logger.PrintlnArgsForCall(0)
288+
content := logger.PrintArgsForCall(0)
289289
Expect(content[0].(string)).To(MatchYAML("hello: world"))
290290
})
291291
})

0 commit comments

Comments
 (0)