Skip to content

Wrong options type when set from environment variables #118

Open
@danielsanfr

Description

@danielsanfr

Hello.

While I was implementing PR: #117, I encountered a problem with the environment variables.

As you can see in the image below, the _baseUrlDirect variable has the correct type (boolean), as it was not set via the environment variable. However, the other two _directAccess and _presignedUrl variables that were set as environment variables, are not being converted to the correct type (it should be boolean).

2020-11-17_00-45

This problem causes a check of the form if (_directAccess) { ... }, do not be verified as expected.

I would like to know if I can create a PR using the https://www.npmjs.com/package/boolean lib to do this conversion?

I don't know if you noticed, but the _presignedUrlExpires variable should be an integer, but it is also a string. However, this case can be solved with the standard parseInt() Javascript library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions