Skip to content

minAppVersion warning, but using requireApiVersion() as a gate #151

@chrisgurney

Description

@chrisgurney

I'm getting this warning:

'Plugin.registerCliHandler' requires Obsidian v1.12.2, but minAppVersion is 1.11.0.

However, I have an requireApiVersion('1.12.2') in my code path (up one class) before the handler is registered.

if (Platform.isDesktop && requireApiVersion('1.12.2')) this.cli.register();

And here's this.cli.register():

    register(): void {
...
        // register the commands with Obsidian
        for (const cmd of this.cliDefinition.commands) {
            this.ntb.registerCliHandler(cmd.id, cmd.description, cmd.flags, this.cliHandlers.get(cmd.id));
        }

    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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