previewgenerator icon indicating copy to clipboard operation
previewgenerator copied to clipboard

setting preview size error from occ command

Open tincanfury opened this issue 2 years ago • 3 comments

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>

tincanfury avatar Jun 23 '23 20:06 tincanfury

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

arkharim avatar Jul 11 '23 17:07 arkharim

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

DesertCookie avatar Sep 17 '23 13:09 DesertCookie

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:

  • running docker exec (particularly without -it)
  • using sudo
  • using su

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.

joshtrichards avatar Mar 30 '24 00:03 joshtrichards