Skip to content

Commit a346745

Browse files
n-ArnoArnaud ALCABAS
andauthored
Switch to stdout in order for serverless compose to be able to parse output (#91)
Co-authored-by: Arnaud ALCABAS <[email protected]>
1 parent 3903b9a commit a346745

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

info/lib/display.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ module.exports = {
1818
Object.keys(configInput.custom.containers).length !== 0
1919
) {
2020
this.listContainers(namespace.id).then((containers) => {
21+
var output = {};
2122
containers.forEach((container) => {
22-
this.serverless.cli.log(yaml.dump(container));
23+
output[container["name"]] = container;
2324
});
25+
console.log(yaml.dump({"Stack Outputs": {"containers": output}}));
2426
});
2527
} else {
2628
this.listFunctions(namespace.id).then((functions) => {
29+
var output = {};
2730
functions.forEach((func) => {
28-
this.serverless.cli.log(yaml.dump(func));
31+
output[func["name"]] = func;
2932
});
33+
console.log(yaml.dump({"Stack Outputs": {"functions": output}}));
3034
});
3135
}
3236
});

0 commit comments

Comments
 (0)