occ backup:point:comment only works with comments not having blanks
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 272
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I tried to set some comments at the restoring points, but it only works when replacing all blanks with _, e.g. "this_is_a_comment".
And yes, it's clear to use quotes when having blanks in CLI.
But looking at the exception trace it doesn't seem to be a backup app problem.
# occ backup:point:comment _pointId_redacted_ "this is a comment" -vvv
In ArgvInput.php line 172:
[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments "command" "pointId" "comment".
Exception trace:
at /config/www/nextcloud/3rdparty/symfony/console/Input/ArgvInput.php:172
Symfony\Component\Console\Input\ArgvInput->parseArgument() at /config/www/nextcloud/3rdparty/symfony/console/Input/ArgvInput.php:83
Symfony\Component\Console\Input\ArgvInput->parse() at /config/www/nextcloud/3rdparty/symfony/console/Input/Input.php:55
Symfony\Component\Console\Input\Input->bind() at /config/www/nextcloud/3rdparty/symfony/console/Command/Command.php:214
Symfony\Component\Console\Command\Command->run() at /config/www/nextcloud/core/Command/Base.php:168
OC\Core\Command\Base->run() at /config/www/nextcloud/3rdparty/symfony/console/Application.php:1009
Symfony\Component\Console\Application->doRunCommand() at /config/www/nextcloud/3rdparty/symfony/console/Application.php:273
Symfony\Component\Console\Application->doRun() at /config/www/nextcloud/3rdparty/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at /config/www/nextcloud/lib/private/Console/Application.php:211
OC\Console\Application->run() at /config/www/nextcloud/console.php:99
require_once() at /config/www/nextcloud/occ:11
backup:point:comment [--output [OUTPUT]] [--remote REMOTE] [--external EXTERNAL] [--all-storages] [--] <pointId> <comment>
nextcloud: 23.0.2.1
backup:1.0.4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the command using the quoted comment, then trace argument parsing from 3rdparty/symfony/console/Input/ArgvInput.php through core/Command/Base.php and the backup command entry point. Compare the documented backup:point:comment arguments with the observed parsing behavior. Done means a comment containing spaces is accepted as one comment argument.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100