fix(docker-widget): Fixed issue with indexing nil [#360] and button#368
Open
HamishFleming wants to merge 1 commit intostreetturtle:masterfrom
Open
fix(docker-widget): Fixed issue with indexing nil [#360] and button#368HamishFleming wants to merge 1 commit intostreetturtle:masterfrom
HamishFleming wants to merge 1 commit intostreetturtle:masterfrom
Conversation
…and issues preventing button rendering
Owner
|
This looks big - I'll need some time to test it. Thanks! 👍 |
|
Any news on this ? :) |
Ryex
reviewed
Sep 12, 2022
Ryex
left a comment
There was a problem hiding this comment.
Other than the bad require this seems to work flawlessly after my local fix
| local WIDGET_DIR = script_path() | ||
| local ICONS_DIR = WIDGET_DIR .. "/icons/" | ||
|
|
||
| local clickable_container = require(WIDGET_DIR .. "clickable-container") |
There was a problem hiding this comment.
This is not a reliable method of requiring relative to the local script
error: ...nfig/awesome/awesome-wm-widgets/docker-widget/docker.lua:27: module '/home/ryex/.config/awesome/awesome-wm-widgets/docker-widget/clickable-container' not found:
no field package.preload['/home/ryex/.config/awesome/awesome-wm-widgets/docker-widget/clickable-container']
no file '/usr/share/lua/5.4//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file '/usr/share/lua/5.4//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file '/usr/lib/lua/5.4//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file '/usr/lib/lua/5.4//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file './/home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file './/home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file '/home/ryex/.config/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file '/home/ryex/.config/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file '/etc/xdg/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file '/etc/xdg/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file '/usr/share/awesome/lib//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file '/usr/share/awesome/lib//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file '/usr/lib/lua/5.4//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file '/usr/lib/lua/5.4/loadall.so'
no file './/home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file '/home/ryex/.config/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file '/etc/xdg/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file '/usr/share/awesome/lib//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file '/home/ryex/.config/awesome/modules/lockscreen/lib//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file ''
no file '/usr/lib/lua/5.4//home/ryex/.so'
no file '/usr/lib/lua/5.4/loadall.so'
no file './/home/ryex/.so'
no file '/home/ryex/.config/awesome//home/ryex/.so'
no file '/etc/xdg/awesome//home/ryex/.so'
no file '/usr/share/awesome/lib//home/ryex/.so'
no file '/home/ryex/.config/awesome/modules/lockscreen/lib//home/ryex/.so'
no file ''
perhaps try
local clickable_container = require((...):match("(.-)[^%.]+$") .. "clickable-container")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The main fix was on line 77
There were also a few other issues I was getting around icon location/the same error I had in PR #357 and resolved it the same way.
Feel free to take anything needed from this