nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
450 stars 55 forks source link

setting preview size error from occ command #401

Open tincanfury opened 1 year ago

tincanfury commented 1 year ago

Nextcloud Hub (26.0.3) via docker from linuxserver.io all the commands provided,

./occ config:app:set --value="32 64 1024"  previewgenerator squareSizes
./occ config:app:set --value="64 128 1024" previewgenerator widthSizes
./occ config:app:set --value="64 256 1024" previewgenerator heightSizes

result in the same error, ie,

 $ occ config:app:set --value="64 256 1024" previewgenerator squareSizes
  Too many arguments, expected arguments "command" "app" "name".
config:app:set [--output [OUTPUT]] [--value VALUE] [--update-only] [--] <app> <name>
arkharim commented 12 months ago

Use backslash before each ". From: https://github.com/nextcloud/previewgenerator/issues/212#issuecomment-1323651064 It works for me.

DesertCookie commented 9 months ago

This issue still persists - even for commands that have no backslashes in them.

joshtrichards commented 3 months ago

This isn't a bug in the previewgenerator. The variance in behavior for different people here (and in the linked issue) is because what's needed depends on how one opens the interactive shell session they're running the command in.

This is a Unix/Linux/OS thing.

Generally a mixture of single quotes or single quotes will work, but there's no single command because it depends.

The following situations commonly create this situation:

I'd love to document this is some way nicely, but I'm afraid someone can always come up with a different runtime environment combination. :-)

If there was to be an attempt to document this (which is not Nextcloud specific) it would belong likely in the Admin Manual in the occ command introduction/overview section.