Skip to content

Commit 5af84d8

Browse files
committed
Make sure that logs are shwon from inside the runner
1 parent 1e34f3b commit 5af84d8

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
## Master
1515

16+
# 6.0.3
17+
18+
- Fix passing stdout from the sub-process back to the user - [@orta][]
1619
- Fix handling a `"pending"` status update properly using Bitbucket API - [@sgtcoolguy][]
1720
- Fix #614 - Posting status updates to Github using issue workflow broken - [@sgtcoolguy][]
1821
- Fix vertical alignment in GitHub issue template - [@patrickkempff][]
@@ -1357,3 +1360,5 @@ Not usable for others, only stubs of classes etc. - [@orta][]
13571360
[@cwright017]: https://github.com/Cwright017
13581361
[@adamnoakes]: https://github.com/adamnoakes
13591362
[@johansteffner]: https://github.com/johansteffner
1363+
[@sgtcoolguy]: https://github.com/sgtcoolguy
1364+
[@patrickkempff]: https://github.com/patrickkempff

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,14 @@
2525
"cacheDirectory": ".jest/cache"
2626
},
2727
"lint-staged": {
28-
"*.json": [
28+
"*.@(json|md)": [
2929
"yarn prettier --write",
3030
"git add"
3131
],
3232
"*.@(ts|tsx)": [
3333
"tslint --fix",
3434
"yarn prettier --write",
3535
"git add"
36-
],
37-
"*.md": [
38-
"yarn prettier --write",
39-
"git add"
4036
]
4137
},
4238
"pkg": {

source/commands/utils/runDangerSubprocess.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ export const runDangerSubprocess = (
5353
if (!results && maybeJSONURL) {
5454
d("Got JSON URL from STDOUT, results are at: \n" + maybeJSONURL)
5555
results = JSON.parse(readFileSync(maybeJSONURL.replace("danger-results:/", ""), "utf8"))
56-
}
57-
58-
if (!results && maybeJSON) {
56+
} else if (!results && maybeJSON) {
5957
d("Got JSON results from STDOUT, results: \n" + maybeJSON)
6058
results = JSON.parse(maybeJSON)
59+
} else {
60+
// Pass it back to the user
61+
console.log(data.toString())
6162
}
6263
})
6364

source/runner/Executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export class Executor {
228228
let issueURL = undefined
229229

230230
if (failureCount + messageCount === 0) {
231-
this.log("No issues or messages were sent. Removing any existing messages.")
231+
this.log(`Found no issues or messages from Danger. Removing any existing messages on ${this.platform.name}.`)
232232
await this.platform.deleteMainComment(dangerID)
233233
const previousComments = await this.platform.getInlineComments(dangerID)
234234
for (const comment of previousComments) {

0 commit comments

Comments
 (0)