spack/bin/spack_pwsh.ps1
Tom Scogland 4905a71d6d
refactor powershell setup to make it sourceable (#29987)
* refactor powershell setup to make it sourceable

* only set editor if it is unset

* change directory to spack root in subshell

* Update share/spack/setup-env.ps1

Co-authored-by: John W. Parent <45471568+johnwparent@users.noreply.github.com>

Co-authored-by: John W. Parent <45471568+johnwparent@users.noreply.github.com>
2022-04-20 17:11:44 -07:00

10 lines
370 B
PowerShell

# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
$Env:SPACK_PS1_PATH="$PSScriptRoot\..\share\spack\setup-env.ps1"
& (Get-Process -Id $pid).Path -NoExit {
. $Env:SPACK_PS1_PATH ;
Push-Location $ENV:SPACK_ROOT
}