gron icon indicating copy to clipboard operation
gron copied to clipboard

overly large?

Open ranger671 opened this issue 7 years ago • 2 comments

I have a json file owned by me but gron keeps posting a permission denied when trying to execute against the listed file. If I run gron to parse stdin, it works. The o2.json is one large line without an EOL. Could I be receiving an incorrect error? The copy of gron is installed on an Ubuntu 18.04 via snap. As you can see the executable(?) is just a link pointing back to snap (this is my first snap installed app, and I'm not sure this is correct). Anyway, any pointers/help would be greatly appreciated.

username@mach:/Stranded Deep/Data$ ls -al o2.json -rw-rw-rw- 1 username group 40206 Sep 9 14:18 o2.json username@mach:/Stranded Deep/Data$ gron o2.json open o2.json: permission denied

:/usr/bin$ ls -al which gron lrwxrwxrwx 1 root root 13 Sep 9 15:16 /snap/bin/gron -> /usr/bin/snap

ranger671 avatar Sep 09 '18 19:09 ranger671

I'm seeing this as well.

$ echo '{"a":"b"}' > a.json
$ gron a.json
open a.json: permission denied
$ gron < a.json
json = {};
json.a = "b";
$ gron --version
gron version dev
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic
$ snap info gron
name:      gron
summary:   Make JSON greppable
publisher: Nathan Handler (nhandler)
contact:   https://github.com/tomnomnom/gron/issues
license:   unset
description: |
  gron transforms JSON into discrete assignments to make it easier to grep for
  what you want and see the absolute 'path' to it. It eases the exploration of
  APIs that return large blobs of JSON but have terrible documentation.
commands:
  - gron
  - gron.norg
  - gron.ungron
snap-id:      NOsPS3OeY0LoGwvALnI0iw0nNEflKI49
tracking:     stable
refresh-date: today at 11:37 PDT
channels:
  stable:    0.5.0-2 2017-05-17 (3) 2MB -
  candidate: ↑                          
  beta:      ↑                          
  edge:      ↑                          
installed:   0.5.0-2            (3) 2MB -

transplier avatar May 24 '19 18:05 transplier

The snap for this package isn't built very well and there are no options to open connections and give it access to your home directory, /tmp, etc. If you want to use the snap, then your best option is to use --devmode:

$ snap remove gron
gron removed
$ snap install gron --devmode

This has pros and cons. It will allow you to use the snap package but it won't allow you to get auto-updates + gron won't be confined. To update it regularly, you can have a simply cron job that removes it and re-installs it with the --devmode flag

ossie-git avatar Dec 06 '20 23:12 ossie-git