simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.2k stars 36 forks source link

Flags not being passed to subcommands #193

Closed chorca closed 3 months ago

chorca commented 3 months ago

Was trying to debug an issue I was having connecting to my instance with this tool, and I couldn't get the api traces to work. After some digging, it appears that while the subcommands re-parse the CLI options, they aren't being passed the full set. In this switch statement, it seems the call should be to os.Args[1:] instead of fs.Args()[1:]. https://github.com/simulot/immich-go/blob/607c29d5e6399cf0dd5ec02688be3497d767462a/main.go#L80 After making that change the subcommands received the full set of args and I was able to activate the api trace logging.

simulot commented 3 months ago

You can place the -api-trace after the command it works.