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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid to rewrite the error #19

Merged
merged 4 commits into from
Oct 22, 2017
Merged

Conversation

allevo
Copy link
Member

@allevo allevo commented Oct 19, 2017

No description provided.

@@ -0,0 +1,3 @@
'use strict'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll put this files inside a test folder :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All tests are inside examples (incorrect-plugin.js too)

}

function runFastify (opts) {
var file = null
try {
file = require(path.resolve(process.cwd(), opts._[0]))
} catch (e) {
console.log(`Cannot find the specified file: '${opts._[0]}'`)
stop(1)
return module.exports.stop(e)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I can ovewrite it during tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like so much as solution, is not elegant. But for the moment could be ok. :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too. But I have not sadly found another solution!

Copy link
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@delvedor delvedor merged commit 0c24b79 into fastify:master Oct 22, 2017
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.

2 participants