flofreud / posh-gvm

GVM for Powershell
Apache License 2.0
210 stars 60 forks source link

How do I change the default path of posh-gvm ? #16

Open wureka opened 8 years ago

wureka commented 8 years ago

I found that posh-gvm default set its path as C:\Users\user.posh_gvm. However, in my case, the space of my C: is not very large. So, can I set the default path of posh-gvm to other path ? such as D:\posh_gvm (in my case). Thanks a lot.

flofreud commented 8 years ago

You need to declare $Global:PGVM_DIR before loading posh-gvm.

flofreud commented 8 years ago

For reference here the code

if ( !(Test-Path Variable:Global:PGVM_DIR) ) {
    $Global:PGVM_DIR = "$env:USERPROFILE\.posh_gvm"
}

https://github.com/flofreud/posh-gvm/blob/master/posh-gvm.psm1#L11