🐛 Bug Report: create-one-time-access-token.sh doesn't work with its optional arguments #413

Closed
opened 2025-10-07 00:14:01 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @antifuchs on GitHub.

Reproduction steps

When I invoke create-one-time-access-token.sh -d /path/to/db foo@example.com it errors saying that the username -d isn't valid.

Expected behavior

It should access the given database and create an access token for the user foo@example.com.

Actual Behavior

It sets the user identifier to the first arg on line 3, which is before optional argument processing happens; that variable should instead be set after the optional args get shifted away, on line 18.

Originally created by @antifuchs on GitHub. ### Reproduction steps When I invoke `create-one-time-access-token.sh -d /path/to/db foo@example.com` it errors saying that the username `-d` isn't valid. ### Expected behavior It should access the given database and create an access token for the user foo@example.com. ### Actual Behavior It sets the user identifier to the first arg on [line 3](https://github.com/stonith404/pocket-id/blob/main/scripts/create-one-time-access-token.sh#L3), which is before optional argument processing happens; that variable should instead be set after the optional args get shifted away, on [line 18](https://github.com/stonith404/pocket-id/blob/main/scripts/create-one-time-access-token.sh#L18).
OVERLORD added the bug label 2025-10-07 00:14:01 +03:00
Author
Owner

@stonith404 commented on GitHub:

Thanks, this should be fixed in v0.24.1

@stonith404 commented on GitHub: Thanks, this should be fixed in `v0.24.1`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#413