Skip to content

Conversation

Garulf
Copy link
Member

@Garulf Garulf commented Nov 30, 2021

Providing this data can help a plugin determine which version of Flow Launcher it's running on as well as help find settings.

@jjw24
Copy link
Member

jjw24 commented Nov 30, 2021

Would it be better to expose this via api(IPublicAPI)?

@Garulf
Copy link
Member Author

Garulf commented Nov 30, 2021

Would it be better to expose this via api(IPublicAPI)?

I don't understand, could you please explain?

@jjw24
Copy link
Member

jjw24 commented Nov 30, 2021

Like what you did for copy to clipboard method

@Garulf
Copy link
Member Author

Garulf commented Nov 30, 2021

Like what you did for copy to clipboard method

These values should help a plugin determine what environment it's running in and act accordingly.

For example if my plugin uses some newer API calls I might check for Flow's version like so:

import os
import sys

if os.getenv("FLOW_VERSION") != "x.x.x":
    sys.exit(1)

I'm unaware of any method to retrieve output from IPublicAPI and act on it in Python.

@jjw24 jjw24 added the enhancement New feature or request label Nov 30, 2021
@jjw24 jjw24 added this to the 1.9.0 milestone Nov 30, 2021
@jjw24 jjw24 merged commit 08ad38e into Flow-Launcher:dev Nov 30, 2021
@Garulf Garulf deleted the flow-info-envs branch November 30, 2021 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants