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

Windows, Double Quotes, Interpreter and Curl #94

Open
acalbazana opened this issue Jun 24, 2021 · 0 comments
Open

Windows, Double Quotes, Interpreter and Curl #94

acalbazana opened this issue Jun 24, 2021 · 0 comments

Comments

@acalbazana
Copy link

Hello,

Thanks for the provider. I'd like to see if there is a way around the escaping of double-quotes. When I run a curl command under windows (cmd interpreter), the interpreter escapes double-quotes during script evaluation and confuses curl. I suspect that this isn't the provider's doing, but I'm looking for guidance if anyone has experienced the same and got around it.

Example .bat file contains:

curl --header "Authorization:Bearer %TOKEN%"

However, the following wants to execute after evaluation:

curl --header "Authorization:Bearer %TOKEN% " ...

which causes curl to become confused on how to view the command (at least on windows).

I have a workaround where I put the full header (double quotes and all) in the environment/secured-environment block and then use it in my script. Example:

environment = {
TOKEN = ""Authorization: Bearer ...""
}

Then in script:

curl --header %TOKEN%

which expands the entire header argument properly, without escaping double-quotes when its finally evaluated by the command interpreter.

Anyway... Looking for ideas.

Thanks!

Alejandro

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

No branches or pull requests

1 participant