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

Default variable value not being honoured on first run #669

Closed
Joshfindit opened this issue Mar 28, 2021 · 3 comments
Closed

Default variable value not being honoured on first run #669

Joshfindit opened this issue Mar 28, 2021 · 3 comments

Comments

@Joshfindit
Copy link

When modifying the Network/bandwidth_primary.1s.sh plugin (matryer/xbar-plugins#1566)

I set the variable as documented:
<xbar.var>string(VAR_NETWORK_INTERFACE="en0"): The interface to track (Usual interface for MacOS wifi is en0)</xbar.var>

Then closed and reopened xbar, and browsed to to Plugin Browser.
It did show successfully:
image

However, 001-bandwidth.1s.sh.vars.json was not created and the variable was not passed in to the plugin.
(Verified by echoing ${VAR_NETWORK_INTERFACE})

I had to change the value in xbar before it created 001-bandwidth.1s.sh.vars.json then change it back to en0 to track the proper interface.

@matryer
Copy link
Owner

matryer commented Mar 29, 2021

Hey @Joshfindit thanks for reporting this, I think you found a bug where default values weren't being used unless you explicitly change them. Will look now.

@matryer
Copy link
Owner

matryer commented Mar 29, 2021

@Joshfindit I think I've fixed it, could you please confirm by trying the latest release?

  • Note: to test this, open the plugin folder and delete the sidecar .vars.json file for the plugin you want to test

@Joshfindit
Copy link
Author

Awesome, I do confirm that the bug is resolved in v2.0.35-beta.
It loads defaults without issue, and displays the variable in the Plugin Browser.

Thank you

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