Skip to content

There is a bug if maxLogFiles suffer with d #6426

Closed
@beiguancyc

Description

@beiguancyc

Hello guys,

I test my app with config :
--appId xxx --masterKey xxx --databaseURI mongodb://xxx --maxLogFiles 20
It's right.

but,if I write this like :
--appId xxx --masterKey xxx --databaseURI mongodb://xxx --maxLogFiles 20d
It's wrong.

undefined:1
20d
^
SyntaxError: Unexpected token d in JSON at position 2

I find the code in follow file.

./lib/Options/parsers.js

function objectParser(opt) {
if (typeof opt == 'object') {
return opt;
}
return JSON.parse(opt);
}

I hope can fix it,Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty:$10Bounty applies for fixing this issue (Parse Bounty Program)state:releasedReleased as stable versionstate:released-alphaReleased as alpha versionstate:released-betaReleased as beta versiontype:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions