Skip to content

Commit

Permalink
feat: Mounting 4bitcss ( Fixes #48 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Apr 20, 2024
1 parent 57b848c commit aa0f479
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 4bitcss.ps.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,15 @@ $myModule = $MyInvocation.MyCommand.ScriptBlock.Module
$ExecutionContext.SessionState.PSVariable.Set($myModule.Name, $myModule)
$myModule.pstypenames.insert(0, $myModule.Name)

$newDriveSplat = @{PSProvider='FileSystem';ErrorAction='Ignore';Scope='Global'}
New-PSDrive -Name $MyModule.Name -Root ($MyModule | Split-Path) @newDriveSplat

if ($home) {
$myMyModule = "My$($myModule.Name)"
$myMyModuleRoot = Join-Path $home $myMyModule
if (Test-Path $myMyModuleRoot) {
New-PSDrive -Name $myMyModule -Root $myMyModuleRoot @newDriveSplat
}
}

Export-ModuleMember -Function *-* -Alias * -Variable $myModule.Name

0 comments on commit aa0f479

Please sign in to comment.