Bug #3395

CR+LF line endings in manifests cause syntax error

Added by Marek Obuchowicz about 2 years ago. Updated almost 2 years ago.

Status:Closed Start date:03/19/2010
Priority:Normal Due date:
Assignee:James Turnbull % Done:

0%

Category:parser
Target version:2.6.0
Affected Puppet version:0.25.3 Branch:jamtur01:tickets/master/3395
Keywords:
Votes: 0

Description

As subject says – CR+LF (windows-specific) line endings in manifests cause syntax error while parsing manifest files. This error may trigger if you create manifest files under windows and then upload it to SVN repo.

History

Updated by James Turnbull about 2 years ago

  • Status changed from Unreviewed to Rejected

I don’t see this as a bug. If you create files under windows and want to use them on Linux/Unix (which is the only place the master currently runs) then you should ensure they are appropriately formatted.

Updated by Alan Barrett almost 2 years ago

3514 is related.

Perhaps adding \r to the value of @skip will help it to treat \r like other whitespace, but I haven’t tested this:

--- lib/puppet/parser/lexer.rb
+++ lib/puppet/parser/lexer.rb  (working copy)
@@ -340,7 +340,7 @@
         @file = nil
         # AAARRGGGG! okay, regexes in ruby are bloody annoying
         # no one else has "\n" =~ /\s/
-        @skip = %r{[ \t]+}
+        @skip = %r{[ \t\r]+}

         @namestack = []
         @indefine = false

Updated by James Turnbull almost 2 years ago

  • Status changed from Rejected to In Topic Branch Pending Review
  • Assignee set to James Turnbull
  • Target version set to 2.6.0
  • Branch set to jamtur01:tickets/master/3395

Updated by Nick Lewis almost 2 years ago

  • Status changed from In Topic Branch Pending Review to Closed

Pushed in commit:c75b2199ca57f4101f1a731fec603f69349c0d5a in master

Also available in: Atom PDF