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

Address over-eager fallback to stdin when decoding #289

Closed
wants to merge 1 commit into from

Conversation

roberth-k
Copy link

On MacOS 10.12.6 using iTerm2 and Bash, the condition at https://github.com/jpadilla/pyjwt/blob/master/jwt/__main__.py#L57 appears to always evaluate to True regardless of whether the user had passed a JWT on the command line or not. Hence a command such as pyjwt decode --no-verify json.web.token (where json.web.token is a valid JWT) is not usable.

This change modifies the command-line interface such that the application will only attempt to read from stdin if the input had not been passed.

@coveralls
Copy link

coveralls commented Sep 5, 2017

Coverage Status

Coverage decreased (-1.9%) to 98.077% when pulling 5a6b783 on milliburn:fix-decode-read-stdin into 608ed4a on jpadilla:master.

@jpadilla
Copy link
Owner

jpadilla commented Nov 5, 2017

@milliburn thanks for getting this done. Confirmed this via #298 so just opened #304 to get this merged. Your original commit is still attributed to you.

@jpadilla jpadilla closed this Nov 5, 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.

None yet

3 participants