External modules still vanish after git sync file changes
PSU 2026.1.6
Priority: High
The behaviour has been more stable in recent releases, but modules that are not in the main PSU repo are still vanishing after a git sync when the sync changes files in the main repo. This can be fixed by the known method of reloading modules.
If the git sync is stale and has no changes to sync, things are stable and don't require manual intervention.
So:
automated git sync -> git detects changes and PSU reloads config(?) -> git sync delayed trigger -> PSU script getting submodules -> modules with PSU resources vanish in the script view
This is the general sequence, but I can't tell when exactly in the process the external modules vanish. It might be as early as the second step and everything after it doesn't matter.
The consequence of this is not only cosmetic, the vanishing resources also can't be triggered via Invoke-PSUScript anymore.
@schubfre When you say submodules, are they modules as part of the Modules folder in PSU or part of a git submodule repo that is included?
From my understanding it's something like: .universal\scripts.ps1
New-PSUScript -Command MyCommand -Module MyModule New-PSUScript -Path script.ps1 -Name "script.ps1"
Modules\MyModule\MyModule.psm1
function MyCommand {}script.ps1
"Hello, World"
Now, if you were up update script.ps1 via git sync, the MyCommand script would then disappear. Reloading the modules resolves this.
Is that understanding correct?
Adam Driscoll
PowerShell Expert and Developer at Devolutions
@Adam Driscoll if you remember our call a few months ago, it's still like I showed you.
I just call them submodules, they have nothing to do with the innate git functionality. They are located in the PSU \modules folder, but are procured externally by a script that listens to the git sync trigger.
The rest is just like you inferred. Except it's not module resources I have to update for the module to vanish but main resources, it doesn't seem to matter what main resource was touched. Last time I edited a PSU main repo internal module and it caused the external module to vanish after I merged the PR and the git sync ran.