MCPcopy Create free account
hub / github.com/angular/dev-infra / commandFor

Function commandFor

ng-dev/format/formatters/base-formatter.ts:62–71  ·  view source on GitHub ↗

* Retrieve the command to execute the provided action, including both the binary * and command line flags.

(action: FormatterAction)

Source from the content-addressed store, hash-verified

60 * and command line flags.
61 */
62 commandFor(action: FormatterAction): string[] {
63 switch (action) {
64 case 'check':
65 return [this.binaryFilePath, ...this.actions.check.commandFlags];
66 case 'format':
67 return [this.binaryFilePath, ...this.actions.format.commandFlags];
68 default:
69 throw Error('Unknown action type');
70 }
71 }
72
73 /**
74 * Retrieve the callback for the provided action to determine if an action

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected