mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Eliminate dependency on native host for shell
PSRP will of course still require it, but now the managed host sets up the assembly load context, meaning we can depend on the emitted binary from dotnet-cli.
This commit is contained in:
@@ -1,2 +1 @@
|
||||
export CORE_ROOT=$(pwd)/bin
|
||||
lldb-3.6 -o "plugin load ./bin/libsosplugin.so" -- ./powershell $@
|
||||
lldb-3.6 -o "plugin load ./bin/libsosplugin.so" -- ./bin/Microsoft.PowerShell.Linux.Host $@
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export CORE_ROOT=$(pwd)/bin
|
||||
./powershell -c "Invoke-Pester src/pester-tests/$1 -OutputFile pester-tests.xml -OutputFormat NUnitXml"
|
||||
./bin/Microsoft.PowerShell.Linux.Host -c "Invoke-Pester src/pester-tests/$1 -OutputFile pester-tests.xml -OutputFormat NUnitXml"
|
||||
# XML files are not executable
|
||||
chmod -x pester-tests.xml
|
||||
# Fix tty due to possible bug in .NET
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
src/monad-native/host/powershell
|
||||
@@ -1,4 +1,3 @@
|
||||
export CORE_ROOT=$(pwd)/bin
|
||||
./powershell $@
|
||||
./bin/Microsoft.PowerShell.Linux.Host $@
|
||||
# Fix tty due to possible bug in .NET
|
||||
stty echo
|
||||
|
||||
@@ -18,6 +18,12 @@ namespace Microsoft.PowerShell.Linux.Host
|
||||
/// </summary>
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
// Setup the Assembly Load Context, which Core PowerShell uses to
|
||||
// analyze the libraries for types, functions, cmdlets, etc. and
|
||||
// provide the ability to load assemblies by file path. Doing this
|
||||
// here eliminates the need for a custom native host.
|
||||
PowerShellAssemblyLoadContextInitializer.SetPowerShellAssemblyLoadContext(AppContext.BaseDirectory);
|
||||
|
||||
// Custom argument parsing
|
||||
string initialScript = null;
|
||||
if (args.Length > 0)
|
||||
|
||||
Reference in New Issue
Block a user