Uploaded image for project: 'Appcelerator CLI'
  1. Appcelerator CLI
  2. CLI-622

Wrapped `appc ti module --output json` should not show banner

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 4.0.0
    • Fix Version/s: Release 4.0.0
    • Component/s: Core, Titanium
    • Labels:
      None
    • Environment:

      appc-cli 0.2.282

    • Story Points:
      3
    • Sprint:
      2015 Sprint 10 Tooling

      Description

      The appc ti module -o json command shows the banner, where it shouldn't.

      Reproduce

      • Run ti module -o json for the correct output
      • Run appc ti module -o json for the incorrect (with banner) output

      ≫ appc ti  module -o json
      Appcelerator Command-Line Interface, version 0.2.282
      Copyright (c) 2014-2015, Appcelerator, Inc.  All Rights Reserved.
       
      {
      	"global": {
      		"android": {
      

      Related code

      https://github.com/appcelerator/appc-cli/blob/a86886e6636c132eb4daa90551c40066c251994b/bin/appc#L86-L89

      Suggested solution

      If -o and --output is the current standard for setting the output on any of the bundled CLI's, we should keep this standard and change the code to:

      var pos;
      if (((pos = args.indexOf('-o')) !== -1 || (pos = args.indexOf('--output') !== -1)) && args[pos + 1] === 'json') {
      	program.banner = false;
      }
      

        Attachments

          Activity

            People

            • Assignee:
              pinnamuri Praveen Innamuri (Inactive)
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Feon Sua Xin Miao
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code