@shopify/cli-kit
    Preparing search index...

    Function requiredIfNonInteractive

    • Marks a flag as required when the CLI cannot prompt for a value.

      The flag remains optional in interactive terminals. In non-interactive environments, BaseCommand validates the flag automatically and the requirement is shown in --help. Use BaseCommand.nonTTYFlagRequirements for conditional or alternative requirements.

      Type Parameters

      • TFlag extends { description?: string }

      Parameters

      • flag: TFlag

        An oclif flag definition.

      Returns TFlag

      A new flag definition annotated for non-interactive validation and help output.