-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Single and double quotes not interchangeable after xst execute #116
Comments
@daliboris looks like a windows issue to me. On linux double quoted strings will be subject to variable replacement.
|
@daliboris Which shell are you using? |
What happens on windows with the following? xst execute 'xmldb:reindex("/db/apps/" || $project || "-data")' --bind '{ "project": "mordigital" }' --config admin.xstrc |
There seems to be a lot to take into account when it comes to double quotes on windows (see |
I'm using In PowerShell 5.1, the error (for
Running
|
OK, so the readme should point out which combination of quotes works on Linux and windows. |
@daliboris does this command work on windows?
|
Hi @line-o , here are some results (I changed the project name): CMDxst execute "xmldb:reindex('/db/apps/' || $project || '-data')" --bind "{ \"project\": \"lediir\" }" --config admin.xstrc
true PowerShellxst execute "xmldb:reindex('/db/apps/' || $project || '-data')" --bind "{ \"project\": \"lediir\" }" --config admin.xstrc
Problem with a provided Argument:
Error parsing argument bind! Reason: Unexpected token : in JSON at position 12 --bind '{ "project": "lediir" }' xst execute "xmldb:reindex('/db/apps/' || $project || '-data')" --bind '{ \"project\": \"lediir\" }' --config admin.xstrc
XPathException:
err:XPST0003 unexpected token: || [at line 1, column 31] --bind "{ 'project': 'lediir' }" xst execute "xmldb:reindex('/db/apps/' || $project || '-data')" --bind "{ \'project\': \'lediir\' }" --config admin.xstrc
Problem with a provided Argument:
Error parsing argument bind! Reason: Unexpected token \ in JSON at position 2 |
What happened?
When calling
execute
command with parameter that expect string, only combination of single quotes inside double quoted text ("... '..' ... "
) works.The opposit case (
'... ".." ... '
) doesn't work: double quotes are ommited.Combination of single quotes inside double quotes is used in the readme help.
System Information
Relevant shell output
The text was updated successfully, but these errors were encountered: