Skip to content

Commit

Permalink
feat: Mounting MyLightScript ( Fixes #98 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Jan 14, 2024
1 parent e43b8e4 commit 19fc13b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LightScript.ps1.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ $LightScript.pstypenames.insert(0,'LightScript')
New-PSDrive -Name $MyModule.Name -PSProvider FileSystem -Scope Global -Root $PSScriptRoot -ErrorAction Ignore

$MyModuleProfileDirectory = $profile | Split-Path | Join-Path -ChildPath $MyModule.Name
if (-not (Test-Path $MyModuleProfileDirectory)) {
$null = New-Item -ItemType Directory -Path $MyModuleProfileDirectory -Force
}
New-PSDrive -Name "My$($MyModule.Name)" -PSProvider FileSystem -Scope Global -Root $MyModuleProfileDirectory -ErrorAction Ignore

Export-ModuleMember -Function * -Alias * -Variable LightScript

0 comments on commit 19fc13b

Please sign in to comment.