wrapGAppsHook: prepare for structuredAttrs (#511330)

This commit is contained in:
Stefan Frijters
2026-05-24 12:56:07 +00:00
committed by GitHub
@@ -42,11 +42,13 @@ wrapGApp() {
wrapProgram "$program" "${gappsWrapperArgs[@]}" "$@"
}
declare -gA wrapGAppsHookHasRunForOutput
# Note: $gappsWrapperArgs still gets defined even if ${dontWrapGApps-} is set.
wrapGAppsHook() {
# guard against running multiple times (e.g. due to propagation)
[ -z "$wrapGAppsHookHasRun" ] || return 0
wrapGAppsHookHasRun=1
# guard against running multiple times for the same output (e.g. due to propagation)
[ "${wrapGAppsHookHasRunForOutput["$output"]:-}" = 1 ] && return 0
wrapGAppsHookHasRunForOutput["$output"]=1
if [[ -z "${dontWrapGApps:-}" ]]; then
targetDirsThatExist=()