gsoft-inc/azure-pipelines-lighthouse

space characters in CLI arguments not being honored

Closed this issue · 1 comments

I'm trying to add a Basic Auth header into the CLI command via the --extra-headers switch as per the lighthouse documentation
https://github.com/GoogleChrome/lighthouse/blob/master/docs/authenticated-pages.md
This is added to the "CLI arguments" field
--extra-headers="{\"Authorization\":\"Basic 1234567890=\"}"
which adds this to the lighthouse execution (as seen in the pipeline logs)
"--extra-headers=\"{\\\"Authorization\\\":\\\"Basic" "1234567890=\\\"}\""

I've also tried switching the string delimiters such as
--extra-headers='{"Authorization":"Basic 1234567890="}'
which is better, but it looks like the arg is being split on the space character between "Basic" and the value "1234567890="
"--extra-headers='{\"Authorization\":\"Basic" "1234567890=\"}'"

How do I get the pipeline task to accept the argument "as is"?

Hi @bradmack, I've updated the extension, it now handles lighthouse CLI arguments complex arguments like extra headers.

I've used it against a w3.org test website that uses basic authentication and it worked properly.

image

image