openshift / oc

The OpenShift Command Line, part of OKD
https://www.openshift.org
Apache License 2.0
200 stars 382 forks source link

oc patch fails in Windows 10 PowerShell #466

Closed DonSchenck closed 3 years ago

DonSchenck commented 4 years ago

Note: This patch DOES work when I use Windows Subsystem for Linux (using Ubuntu).

It does not work with Windows 10 Enterprise and PowerShell.

Here's the command and results:

❯ oc patch pipelineresource -n pipelines-tutorial qotd-git --type=json -p '[{"op":"replace","path":"/spec/params/0/value","value":"https://github.com/donschenck/qotd-python.git"}]'

The "" is invalid

Here is the JSON attempting to be patched:

{ "apiVersion": "v1", "items": [ { "apiVersion": "tekton.dev/v1alpha1", "kind": "PipelineResource", "metadata": { "creationTimestamp": "2020-06-15T18:08:51Z", "generation": 4, "name": "qotd-git", "namespace": "pipelines-tutorial", "resourceVersion": "513280", "selfLink": "/apis/tekton.dev/v1alpha1/namespaces/pipelines-tutorial/pipelineresources/qotd-git", "uid": "c92d1ae0-0de2-4cfb-bae0-bb3b8b2d9869" }, "spec": { "params": [ { "name": "url", "value": "https://github.com/redhat-developer-demos/qotd.git" } ], "type": "git" } }, { "apiVersion": "tekton.dev/v1alpha1", "metadata": { "creationTimestamp": "2020-06-15T18:14:04Z", "generation": 1, "name": "qotd-image", "namespace": "pipelines-tutorial", "resourceVersion": "84049", "selfLink": "/apis/tekton.dev/v1alpha1/namespaces/pipelines-tutorial/pipelineresources/qotd-image", "uid": "4f1da0a8-bca6-4726-bd78-9bf015c1cc57" }, "spec": { "params": [ { "name": "url", "value": "image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/qotd:latest" } ], "type": "image" } } ], "kind": "List", "metadata": { "resourceVersion": "", "selfLink": "" } }

openshift-bot commented 4 years ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot commented 4 years ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot commented 3 years ago

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-ci-robot commented 3 years ago

@openshift-bot: Closing this issue.

In response to [this](https://github.com/openshift/oc/issues/466#issuecomment-748631332): >Rotten issues close after 30d of inactivity. > >Reopen the issue by commenting `/reopen`. >Mark the issue as fresh by commenting `/remove-lifecycle rotten`. >Exclude this issue from closing again by commenting `/lifecycle frozen`. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.