Skip to content

Commit 187c1f2

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: Mounting Irregular ( Fixes #213 )
1 parent 3e8a3bd commit 187c1f2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Irregular.psm1

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

17+
$newDriveCommonParameters =
18+
@{PSProvider='FileSystem';Scope='Global';ErrorAction='Ignore'}
19+
New-PSDrive -Name $myModule.name @newDriveCommonParameters -Root ($myModule | Split-Path)
20+
21+
if ($home) {
22+
$MyMyModule= "My$($myModule.name)"
23+
New-PSDrive -Name $MyMyModule @newDriveCommonParameters -Root (Join-Path $home $MyMyModule)
24+
}
25+
1726
Import-RegEx
1827

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

0 commit comments

Comments
 (0)