Don't execute lsb_release
more than once #69
Labels
No labels
bug
bullseye
discussion
duplicate
enhancement
help wanted
invalid
question
suggestion
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
#70 Optimize OS/release/version detection for faster execution
evolix/evocheck
Reference: evolix/evocheck#69
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Each time a Debian version is checked,
lsb_release
is executed. It accounts for almost half a second.I've found a way, but there is a weird bug that I can't see :
It should print
but it prints this :
What am I missing ???
Don't execute `lsb-release` more than onceto Don't execute `lsb_release` more than onceIMHO when you exec $(debian_release) it opens a sub-shell and it doesn't modify your real DEBIAN_RELEASE variable.
Exactly, thanks!
The shell language is no fun here.
I didn't find a way to call a function inside an interpolation, without changing the scope of variables.
Here is the workaround I've found : f732577b9a503316452d6a56686c944722bfc20e