Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43513

Windows CLI client running groovysh command produces odd formatting

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • Jenkins:
      - Jenkins ver. 2.54 running on Ubuntu 15.04
      - New jenkins-cli.jar as downloaded from the instance
      Client:
      - Windows 10 Professional
      - Java SE Runtime Environment (build 1.8.0_121-b13)

      Summary:
      When run from a Windows client, using either PowerShell or the traditional cmd.exe command prompt, use of the groovysh CLI command produces unexpected characters and formatting in the output. This can be seen when connecting to both Windows and Linux Jenkins servers.

      Steps to recreate:

      1. Install and launch the latest weekly of Jenkins on either a Linux or a Windows server.
      2. Download the most up to date version of jenkins-cli.war from this same Jenkins.
      3. Run java -jar jenkins-cli.jar -s http://1.2.3.4:8080/ -ssh -user admin groovysh from a Windows system.
      4. Although the command seems to work, its output is badly formatted. Screen shots immediately below.

      PowerShell:

      cmd.exe:

      Everything is formatted correctly when run from a Linux box. This is the same command, pointed at the same Jenkins:

          [JENKINS-43513] Windows CLI client running groovysh command produces odd formatting

          Karl Shultz added a comment -

          FTR, this is reproducible with older versions of the CLI client too. In other words, not isolated to Jenkins >= 2.54.

          Karl Shultz added a comment - FTR, this is reproducible with older versions of the CLI client too. In other words, not isolated to Jenkins >= 2.54.

          Oleg Nenashev added a comment -

          Which CLI mode do you use? The default HTTP one? What does happen in SSH mode? Anyway, I would assume this is just another encoding problem when master and client have different encodings

          Oleg Nenashev added a comment - Which CLI mode do you use? The default HTTP one? What does happen in SSH mode? Anyway, I would assume this is just another encoding problem when master and client have different encodings

          Karl Shultz added a comment -

          It's the same behavior with all three modes (-ssh, -remoting, and default HTTP).

          Karl Shultz added a comment - It's the same behavior with all three modes (-ssh, -remoting, and default HTTP).

          Daniel Beck added a comment -

          These are ANSI escape sequences that tell Unix shells how to format things (bold, colored, etc.).

          https://en.wikipedia.org/wiki/ANSI_escape_sequences

          The rectangle is an ASCII ESC char, followed by the rest of the sequence. It's just that on Windows, the shell doesn't interpret these sequences.

          Should probably add a "--plain" option to the groovysh command to accomodate lesser operating systems.

          Daniel Beck added a comment - These are ANSI escape sequences that tell Unix shells how to format things (bold, colored, etc.). https://en.wikipedia.org/wiki/ANSI_escape_sequences The rectangle is an ASCII ESC char, followed by the rest of the sequence. It's just that on Windows, the shell doesn't interpret these sequences. Should probably add a "--plain" option to the groovysh command to accomodate lesser operating systems.

            Unassigned Unassigned
            kshultz Karl Shultz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: