Skip to content

Error from invalid JSON is silently ignored #12

@sjungwirth

Description

@sjungwirth

Cryptex/src/index.js

Lines 168 to 172 in 820187e

try {
this._confFile = _.clone(require(path.resolve(this._opts.file)), true)
} catch (e) {
this._confFile = {}
}

What do you think about throwing a UserError here if e.name === "SyntaxError"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions