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

Escaping spaces in Windows CMD or Powershell doesn't work #777

Open
deefstes opened this issue Apr 14, 2021 · 1 comment
Open

Escaping spaces in Windows CMD or Powershell doesn't work #777

deefstes opened this issue Apr 14, 2021 · 1 comment

Comments

@deefstes
Copy link

Describe the bug
When evaluating an expression that contains spaces against a yaml file, escaping the spaces do not work in Windows CMD or in Powershell. However, when evaluating the same expression against a new yaml file (--null-input flag), it works as expected.

Version of yq: 4.6.3
Operating system: Windows
Installed via: Downloaded latest binary

Input Yaml

a: true
b: 2

Command
In CMD.exe

yq e ".c = ""something" new""" sample.yml

or in Powershell:

yq e '.c = ""something" new""' sample.yml

Actual behavior

Error: open .c = "something new" sample.yaml: The filename, directory name, or volume label syntax is incorrect.

Expected behavior

a: true
b: 2
c: something new

Additional context
The following command did run as expected:
In CMD.exe

yq e -n ".c = ""something" new"""

or in Powershell:

yq e -n '.c = ""something" new""'

Observed behavior

c: something new
@phreed
Copy link

phreed commented May 28, 2021

Take a look at my comment in #747

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants