Skip to content

Add support for output format to occ files:scan #27030

@tgoeg

Description

@tgoeg

Steps to reproduce

1.occ files:scan --output=json_pretty -- user

{"reqId":"UPIugY3Zgb2Oo5c0EFiw","level":1,"time":"2021-05-19T10:20:31+00:00","remoteAddr":"","user":"--","app":"admin_audit","method":"","url":"--","message":"Console command executed: files:scan --output=json_pretty -- user","userAgent":"--","version":"19.0.8.1"}
Unknown user 1 user
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 0       | 0     | 00:00:00     |
+---------+-------+--------------+

occ files:scan --output=json -- user

{"reqId":"71yPn7HwMRty0OuhXFXH","level":1,"time":"2021-05-19T10:20:40+00:00","remoteAddr":"","user":"--","app":"admin_audit","method":"","url":"--","message":"Console command executed: files:scan --output=json -- user","userAgent":"--","version":"19.0.8.1"}
Unknown user 1 user
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 0       | 0     | 00:00:00     |
+---------+-------+--------------+

occ files:scan --output=plain -- user

{"reqId":"7SR7CkmnEtTrcZXtfYFX","level":1,"time":"2021-05-19T10:20:46+00:00","remoteAddr":"","user":"--","app":"admin_audit","method":"","url":"--","message":"Console command executed: files:scan --output=plain -- user","userAgent":"--","version":"19.0.8.1"}
Unknown user 1 user
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 0       | 0     | 00:00:00     |
+---------+-------+--------------+

Expected behaviour

The output format should actually change. In conjunction with #27029 this makes parsing for errors even harder.

Server configuration

Nextcloud version:
19.0.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developAccepted and waiting to be taken care of25-feedbackbugfeature: occgood first issueSmall tasks with clear documentation about how and in which place you need to fix things in.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions