validate-dockerfile
Advanced tools
Comparing version 1.4.7 to 1.4.8
@@ -63,2 +63,3 @@ 'use strict'; | ||
var hasCmd = false; | ||
var escapedNewline = false; | ||
var currentLine = 0; | ||
@@ -75,2 +76,9 @@ var errors = []; | ||
var thisLineEscaped = escapedNewline; | ||
escapedNewline = line.slice(-1) === '\\'; | ||
if (thisLineEscaped) { | ||
return; | ||
} | ||
// First instruction must be FROM | ||
@@ -77,0 +85,0 @@ if (!fromCheck) { |
{ | ||
"name": "validate-dockerfile", | ||
"version": "1.4.7", | ||
"version": "1.4.8", | ||
"description": "Validates a Dockerfile", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -99,2 +99,10 @@ 'use strict'; | ||
)); | ||
it('should allow escaped newlines', expectsSuccess( | ||
'RUN echo "A long time ago"\\\necho "In a galaxy far, far away"' | ||
)); | ||
it('should allow multiple escaped newlines', expectsSuccess( | ||
'RUN echo "It is a period of civil war. Rebel"\\\necho "spaceships, striking from a hidden"\\\necho "base, have won their first victory"\\\necho "against the evil Galactic Empire."' | ||
)); | ||
}); | ||
@@ -101,0 +109,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31849
23
506