Skip to content

Commit 3e8a3bd

Browse files
author
James Brundage
committed
feat: Mounting Irregular ( Fixes #213 )
1 parent 76dc60b commit 3e8a3bd

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Irregular.ps.psm1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ $MyModule = $MyInvocation.MyCommand.ScriptBlock.Module
55
$ExecutionContext.SessionState.PSVariable.Set($myModule.Name, $MyModule)
66
$MyModule.pstypenames.insert(0, $myModule.Name)
77

8+
$newDriveCommonParameters =
9+
@{PSProvider='FileSystem';Scope='Global';ErrorAction='Ignore'}
10+
New-PSDrive -Name $myModule.name @newDriveCommonParameters -Root ($myModule | Split-Path)
11+
12+
if ($home) {
13+
$MyMyModule= "My$($myModule.name)"
14+
New-PSDrive -Name $MyMyModule @newDriveCommonParameters -Root (Join-Path $home $MyMyModule)
15+
}
16+
817
Import-RegEx
918

1019
foreach ($k in $script:_RegexLibrary.Keys) {

0 commit comments

Comments
 (0)