Skip to content

Commit

Permalink
fix(cli): don't output file lists and dep versions in scan command
Browse files Browse the repository at this point in the history
Pending a proper revisit to this command, we really needed to not
print out all those file lists.
  • Loading branch information
edvald authored and thsig committed Mar 2, 2021
1 parent 03b6f10 commit 8bdb702
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/commands/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@ export class ScanCommand extends Command {
async action({ garden, log }: CommandParams): Promise<CommandResult<DeepPrimitiveMap>> {
const graph = await garden.getConfigGraph(log)
const modules = graph.getModules().map((m) => {
return omit(m, ["_config", "cacheContext", "serviceNames", "taskNames"])
return {
...omit(m, ["_config", "cacheContext", "serviceNames", "taskNames"]),
version: omit(m.version, ["dependencyVersions"]),
}
})

const output = { modules }

const shortOutput = {
modules: modules.map((m) => {
m.serviceConfigs!.map((s) => delete s.spec)
return omit(m, ["spec"])
return { ...omit(m, ["spec"]), version: m.version?.versionString }
}),
}

Expand Down

0 comments on commit 8bdb702

Please sign in to comment.