I ran into an issue while setting up sccache-dist authentication.
generate-jwt-hs256-key can generate a secret key whose first character is -.
When that value is passed to generate-jwt-hs256-server-token --secret-key <KEY>,
the CLI parser treats the key as another flag instead of as the value for --secret-key,
and the command fails.
Reproduction log
Example flow:(the token and keys are already disabled)
sccache-init-1 | + CLIENT_TOKEN=PFaN0gS4ys6BfjPaoATgjO3LDZjazpi_6-zKM8W2zUc
sccache-init-1 | + sccache-dist auth generate-jwt-hs256-key
sccache-init-1 | + SERVER_SECRET=-9LcjCfJykRqRV6hR4sb37JFaVEmSiXVPKr-GJGBtkU
sccache-init-1 | + sccache-dist auth generate-jwt-hs256-server-token --secret-key -9LcjCfJykRqRV6hR4sb37JFaVEmSiXVPKr-GJGBtkU --server 100.112.231.67:10501
sccache-init-1 | error: unexpected argument '-9' found
sccache-init-1 |
sccache-init-1 | Usage: sccache-dist auth generate-jwt-hs256-server-token --server <SERVER_ADDR> <--config <PATH>|--secret-key <KEY>> sccache-init-1 | sccache-init-1 | For more information, try '--help'.
I ran into an issue while setting up
sccache-distauthentication.generate-jwt-hs256-keycan generate a secret key whose first character is-.When that value is passed to
generate-jwt-hs256-server-token --secret-key <KEY>,the CLI parser treats the key as another flag instead of as the value for
--secret-key,and the command fails.
Reproduction log
Example flow:(the token and keys are already disabled)