Skip to content

Commit

Permalink
Merge pull request #61 from lphiri/master
Browse files Browse the repository at this point in the history
Fix typo and error handling
  • Loading branch information
lphiri authored Dec 2, 2016
2 parents b43789f + 59ed725 commit 0dd83ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var commandValidators = {

function validateCommand(command, context, result) {
if (command.error) {
helper. or(result, command.lineno, command.raw, command.error,null);
helper.addError(result, command.lineno, command.raw, command.error,null);
}
var rules = context.rules;
//Check if command is a valid Dockerfile command
Expand Down
3 changes: 2 additions & 1 deletion lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ function parseLine(line, lineno) {
var commandParserFn = commandParsers[command.name];
if (!commandParserFn) {
// Invalid Dockerfile instruction, but allow it and move on.
// log.debug('Invalid Dockerfile command:', command.name);
console.log('Invalid Dockerfile command:', command.name);
command.error = 'Invalid Command';
commandParserFn = parseString;
}
//LDMOD
Expand Down

0 comments on commit 0dd83ff

Please sign in to comment.