Skip to content

Bad output when given no args #6

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

Open
cv opened this issue Jun 4, 2020 · 1 comment
Open

Bad output when given no args #6

cv opened this issue Jun 4, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@cv
Copy link

cv commented Jun 4, 2020

Got:

npx mysql-schema-ts
TypeError: Cannot read property 'substr' of null
    at Function.ConnectionConfig.parseUrl (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql/lib/ConnectionConfig.js:177:29)
    at new ConnectionConfig (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql/lib/ConnectionConfig.js:9:32)
    at Object.createConnection (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql/index.js:13:34)
    at new MySQL (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql-schema-ts/dist/src/mysql-client.js:27:35)
    at Object.inferSchema (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql-schema-ts/dist/src/index.js:40:16)
    at main (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql-schema-ts/dist/bin/index.js:12:18)
    at Object.<anonymous> (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql-schema-ts/dist/bin/index.js:14:1)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)

Expected a usage message, along the lines of:

mysql-schema-ts v1.6.3 - convert MySQL schemas into TypeScript interfaces
USAGE:
  npx mysql-schema-ts mysql://[USER]:[PASSWORD]@[HOST]:[PORT]/[DATABASE]?[OPTIONS]
@nettofarah
Copy link
Owner

Thanks for reporting!

@nettofarah nettofarah added the bug Something isn't working label Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants