snipsco / snips-issues

Feel free to share your bugs with us.
14 stars 5 forks source link

[Sam] should create /var/lib/snips/skills if it doesn't exist #127

Open koenvervloesem opened 5 years ago

koenvervloesem commented 5 years ago

What's the issue? When someone (accidentally) deletes /var/lib/snips/skills, sam is not able to deploy an assistant anymore:

bash: line 0: cd: /var/lib/snips/skills/: No such file or directory
fatal: could not create work tree dir 'snips-app-assistant-information': Permission denied
✖ Error: find: ‘/var/lib/snips/skills/snips-app-assistant-information’: No such file or directory

Use Cases Impacted The user sees that he still has a couple of apps installed in /var/lib/snips/skills that he doesn't have anymore in his assistant and he decides to get rid of them.

How to reproduce

sudo rm -rf /var/lib/snips/skills
sam install assistant

Expected behavior Sam creates the directory /var/lib/snips/skills and installs the assistant.

Version and Environment Snips Flow 1.1.2 (0.62.3), Sam 0.0.52, Raspbian 9.8

Workaround

sudo mkdir /var/lib/snips/skills                                                                                                         
sudo chown _snips-skills:_snips-skills /var/lib/snips/skills
sam install assistant
cpoisson commented 5 years ago

Hi @koenvervloesem,

Only the snips-skill-server is allowed to create this folder and does it at the install steps (so it needs an uninstall/install to recreate it)

Sam does not use the skill server (at the moment).

Let's keep this feature request opened.

koenvervloesem commented 5 years ago

Hi @cpoisson thanks for your explanation, that makes sense. Users won't make the distinction between Sam and snips-skill-server though, so I agree that it would be better to add this feature in a next version of Sam.