Replies: 1 comment 4 replies
-
The same issue under Cygwin environment in Windows: |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. Decide not to open issue, 'cause there is may be my mistake
Describe the issue
The
yq
throws Error: open /tmp/who_uses_this_service.yaml: no such file or directory error when I try to process a file placed in/tmp
directory. Moreover, yq can process files in any descendant location of/home
directory, but if you will copy this file in /tmp then yq will throw the same error.Version of yq: 4.26.1
Operating system:
Linux 5.15.0-43-generic #46~20.04.1-Ubuntu SMP
Installed via: snap
How to reproduce
In this example I will use
/tmp/who_uses_this_service.yaml
.First, I check that there is already no
who_uses_this_service.yaml
in /tmp.Then, check the current time:
date --rfc-3339=ns
:2022-08-10 01:59:13.065172044+03:00
So, lets create file who_uses_this_service.yaml in any descendant directory of /home:
If you will query this file with yq, for example,
yq '.datacenter.dataline.crm-coupon.api[1]' who_uses_this_service.yaml
, you get the result (10.0.10.10).So, now copy it in /tmp:
cp who_uses_this_service.yaml /tmp/who_uses_this_service.yaml
. Then run the same query,yq '.datacenter.dataline.crm-coupon.api[1]' /tmp/who_uses_this_service.yaml
. You will get an error:Error: open /tmp/who_uses_this_service.yaml: no such file or directory
Check the creation time and access mode:
-rw-rw-r-- 1 mxchist mxchist 9907 2022-08-10 02:02:49.765757989 +0300 /tmp/pods.yaml
File created, and its creation time greater then the last
date --rfc-3339=ns
result. Both user and group is mxchist, my own. I can easily open and editing it.May be, there is lack of access rights anyway? Try run it from within the superuser:
sudo yq '.datacenter.dataline.crm-coupon.api[1]' /tmp/who_uses_this_service.yaml
Nevertheless, still Error: open /tmp/who_uses_this_service.yaml: no such file or directory throwing
I tried different files from different sources, and every file with its own query, and all the time the same result: works in normal directory, fails in /tmp.
Beta Was this translation helpful? Give feedback.
All reactions