Skip to content

Commit

Permalink
feat!: add flags-dir base flag (#519)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: SfCommand.baseFlags may cause compilation errors
  • Loading branch information
mdonnalley committed Mar 22, 2024
1 parent 80d5fa1 commit c8fd443
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions messages/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,7 @@ Found duplicate argument %s.
# warning.arrayInputFormat

The input format for array arguments has changed. Use this format: --array-flag value1 --array-flag value2 --array-flag value3

# flags.flags-dir.summary

Import flag values from a directory.
9 changes: 8 additions & 1 deletion src/sfCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import os from 'node:os';
import { Command, Config, HelpSection } from '@oclif/core';
import { Command, Config, HelpSection, Flags } from '@oclif/core';
import {
envVars,
Messages,
Expand Down Expand Up @@ -122,6 +122,13 @@ export abstract class SfCommand<T> extends Command {
*/
public static errorCodes?: HelpSection;

public static baseFlags = {
'flags-dir': Flags.directory({
summary: messages.getMessage('flags.flags-dir.summary'),
helpGroup: 'GLOBAL',
}),
};

/**
* Set to true if the command must be executed inside a Salesforce project directory.
*
Expand Down

0 comments on commit c8fd443

Please sign in to comment.