Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config:app:set The "--type" option does not exist. #9494

Closed
unnilennium opened this issue Dec 15, 2022 · 1 comment
Closed

config:app:set The "--type" option does not exist. #9494

unnilennium opened this issue Dec 15, 2022 · 1 comment

Comments

@unnilennium
Copy link

documentation for NC 23, 24 , latest tells


sudo -u www-data php occ config:app:set files_sharing
incoming_server2server_share_enabled --value="yes"
Config value incoming_server2server_share_enabled for app files_sharing set to yes

here is the actual result using NC 24


# occ config:app:set --value="true" --type=boolean duplicatefinder ignore_mounted_files 

                                       
  The "--type" option does not exist.  
                                       

config:app:set [--output [OUTPUT]] [--value VALUE] [--update-only] [--] <app> <name>

and here is the output of the command help

# occ config:app:set --help
Description:
  Set an app config value

Usage:
  config:app:set [options] [--] <app> <name>

Arguments:
  app                    Name of the app
  name                   Name of the config to set

Options:
      --output[=OUTPUT]  Output format (plain, json or json_pretty, default is plain) [default: "plain"]
      --value=VALUE      The new value of the config
      --update-only      Only updates the value, if it is not set before, it is not being added
  -h, --help             Display this help message
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi             Force ANSI output
      --no-ansi          Disable ANSI output
  -n, --no-interaction   Do not ask any interactive question
      --no-warnings      Skip global warnings, show command output only
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

please fix the documentation

also as a result when seeing this https://github.com/PaulLereverend/NextcloudDuplicateFinder
Setting | Type | Default
ignore_mounted_files | boolean | false

without type option should I do

occ config:app:set --value="true"  duplicatefinder ignore_mounted_files 
#or
occ config:app:set --value="1"  duplicatefinder ignore_mounted_files 
@kesselb
Copy link
Contributor

kesselb commented Dec 17, 2022

Hi and thanks for your report 👍

The --type option is available for occ config:system:set.
system means the command will modify config.php.

occ config:app:set will alter the oc_appconfig database table.
A --type option is not available here.

NextcloudDuplicateFinder seems to use a wrapper around our app configuration code: https://github.com/PaulLereverend/NextcloudDuplicateFinder/blob/dc64f8240eab29388c2fae62136983f5801392e6/lib/Service/ConfigService.php#L29

occ config:app:set --value="true" duplicatefinder ignore_mounted_files looks like the correct command.

Would you mind sending a pull request for the Duplicate finder app to improve the documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants