Skip to content

Commit

Permalink
- Remove unnecessary trim from split stack trace in module init code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjr4077au committed Dec 20, 2024
1 parent fbbd5d8 commit 90142c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PSAppDeployToolkit.WinGet/ImportsFirst.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-----------------------------------------------------------------------------

# Throw if this psm1 file isn't being imported via our manifest.
if (!([System.Environment]::StackTrace.Split("`n").Trim() -like '*Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModuleManifest(*'))
if (!([System.Environment]::StackTrace.Split("`n") -like '*Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModuleManifest(*'))
{
throw [System.Management.Automation.ErrorRecord]::new(
[System.InvalidOperationException]::new("This module must be imported via its .psd1 file, which is recommended for all modules that supply a .psd1 file."),
Expand Down

0 comments on commit 90142c7

Please sign in to comment.