mirror of
https://github.com/cmderdev/cmder.git
synced 2025-01-11 00:39:08 +08:00
Merge pull request #667 from Pireax/posh-user-script-fix
Fixed problem with Invoke-Expression
This commit is contained in:
commit
80bafd165f
4
vendor/profile.ps1
vendored
4
vendor/profile.ps1
vendored
@ -1,4 +1,4 @@
|
|||||||
# Init Script for PowerShell
|
# Init Script for PowerShell
|
||||||
# Created as part of cmder project
|
# Created as part of cmder project
|
||||||
|
|
||||||
# !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED
|
# !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED
|
||||||
@ -74,7 +74,7 @@ $env:Path = "$Env:CMDER_ROOT\bin;$env:Path;$Env:CMDER_ROOT"
|
|||||||
$CmderUserProfilePath = Join-Path $env:CMDER_ROOT "config/user-profile.ps1"
|
$CmderUserProfilePath = Join-Path $env:CMDER_ROOT "config/user-profile.ps1"
|
||||||
if(Test-Path $CmderUserProfilePath) {
|
if(Test-Path $CmderUserProfilePath) {
|
||||||
# Create this file and place your own command in there.
|
# Create this file and place your own command in there.
|
||||||
Invoke-Expression $CmderUserProfilePath
|
. "$CmderUserProfilePath"
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Creating user startup file: $CmderUserProfilePath"
|
Write-Host "Creating user startup file: $CmderUserProfilePath"
|
||||||
"# Use this file to run your own startup commands" | Out-File $CmderUserProfilePath
|
"# Use this file to run your own startup commands" | Out-File $CmderUserProfilePath
|
||||||
|
Loading…
Reference in New Issue
Block a user