Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-13463

Inline scripts are not saved with a final carriage return

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 5.1
    • 4.4.5
    • None

    Description

      A Bamboo user of ours was recently running a task in Bamboo that executed an inline tcsh script (we have to use tcsh here for historical reasons before anyone links to http://www.faqs.org/faqs/unix-faq/shell/csh-whynot).

      The script was

      exec tcsh -f $0 $*
      
      foreach x (a b c)
        echo $x
      end

      The output was simply

      a

      Investigation showed that adding a comment after the final line resulted in the correct output. However when adding just a carriage return on it's own to the script the faulty output was seen again. Looking at the script after a save, trailing empty lines have been stripped.

      According to some of the developers here, files should always be saved with a trailing EOL as a number of gnu tools require it.

      The workaround for this is trivial however so this is not a major issue but I thought it worth reporting.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fad9523348c2 DaveD
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: