Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use configFilePath when processing stdin #24

Merged
merged 1 commit into from
Jun 18, 2016

Conversation

nexdrew
Copy link
Collaborator

@nexdrew nexdrew commented Jun 7, 2016

As is, doing something like cat Dockerfile | dockerfilelint doesn't work because args to the processContent() function are off by one. Essentially it's passing undefined as file content, resulting in this error:

/Users/nexdrew/git/qi/dockerfilelint/lib/index.js:15
  var lines = content.split(/\r?\n/) || [];
                     ^

TypeError: Cannot read property 'split' of undefined
    at Object.module.exports.run (/Users/nexdrew/git/qi/dockerfilelint/lib/index.js:15:22)
    at processContent (/Users/nexdrew/git/qi/dockerfilelint/bin/dockerfilelint:56:31)
    at Socket.<anonymous> (/Users/nexdrew/git/qi/dockerfilelint/bin/dockerfilelint:28:5)
    at emitNone (events.js:85:20)
    at Socket.emit (events.js:179:7)
    at endReadableNT (_stream_readable.js:913:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Just need to pass the configFilePath in this scenario.

P. S. We would have caught this if we had unit tests for the CLI. I will work on putting something together to address this in the near future. 馃憤

@coveralls
Copy link

coveralls commented Jun 7, 2016

Coverage Status

Coverage remained the same at 98.886% when pulling 3bde4f3 on nexdrew:fix-stdin into d3c8346 on replicatedhq:master.

@marccampbell marccampbell merged commit eaec465 into replicatedhq:master Jun 18, 2016
@nexdrew nexdrew deleted the fix-stdin branch June 20, 2016 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants