Skip to content

Commit ef4e33e

Browse files
committed
Remove PSES installing itself, remove zip file
1 parent 63d86e1 commit ef4e33e

File tree

3 files changed

+10
-34
lines changed

3 files changed

+10
-34
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ docs/_site/
3333
docs/_repo/
3434
docs/metadata/
3535
tools/
36+
*.zip
3637

3738
# quickbuild.exe
3839
/VersionGeneratingLogs/
@@ -67,4 +68,4 @@ module/PowerShellEditorServices/Commands/en-US/*-help.xml
6768
module/PowerShellEditorServices/Third\ Party\ Notices.txt
6869

6970
# Visual Studio for Mac generated file
70-
*.userprefs
71+
*.userprefs
-1.96 MB
Binary file not shown.

scripts/Start-EditorServices.ps1

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
# https://github.com/PowerShell/PowerShellEditorServices/blob/master/module/Start-EditorServices.ps1
1818

1919
param(
20-
[Parameter(Mandatory=$true)]
21-
[ValidateNotNullOrEmpty()]
22-
[string]
23-
$EditorServicesVersion,
24-
2520
[Parameter(Mandatory=$true)]
2621
[ValidateNotNullOrEmpty()]
2722
[string]
@@ -97,6 +92,13 @@ function ExitWithError($errorString) {
9792
exit 1;
9893
}
9994

95+
function WriteSessionFile($sessionInfo) {
96+
$sessionInfoJson = ConvertTo-Json -InputObject $sessionInfo -Compress
97+
Log "Writing session file with contents:"
98+
Log $sessionInfoJson
99+
$sessionInfoJson | Set-Content -Force -Path "$SessionDetailsPath" -ErrorAction Stop
100+
}
101+
100102
# Are we running in PowerShell 2 or earlier?
101103
if ($PSVersionTable.PSVersion.Major -le 2) {
102104
# No ConvertTo-Json on PSv2 and below, so write out the JSON manually
@@ -106,12 +108,6 @@ if ($PSVersionTable.PSVersion.Major -le 2) {
106108
ExitWithError "Unsupported PowerShell version $($PSVersionTable.PSVersion), language features are disabled."
107109
}
108110

109-
function WriteSessionFile($sessionInfo) {
110-
$sessionInfoJson = ConvertTo-Json -InputObject $sessionInfo -Compress
111-
Log "Writing session file with contents:"
112-
Log $sessionInfoJson
113-
$sessionInfoJson | Set-Content -Force -Path "$SessionDetailsPath" -ErrorAction Stop
114-
}
115111

116112
if ($host.Runspace.LanguageMode -eq 'ConstrainedLanguage') {
117113
WriteSessionFile @{
@@ -244,32 +240,11 @@ if ((Test-ModuleAvailable "PowerShellGet") -eq $false) {
244240
# TODO: WRITE ERROR
245241
}
246242

247-
# Check if the expected version of the PowerShell Editor Services
248-
# module is installed
249-
$parsedVersion = New-Object System.Version @($EditorServicesVersion)
250-
if ((Test-ModuleAvailable "PowerShellEditorServices" $parsedVersion) -eq $false) {
251-
if ($ConfirmInstall -and $isPS5orLater) {
252-
# TODO: Check for error and return failure if necessary
253-
LogSection "Install PowerShellEditorServices"
254-
Install-Module "PowerShellEditorServices" -RequiredVersion $parsedVersion -Confirm
255-
}
256-
else {
257-
# Indicate to the client that the PowerShellEditorServices module
258-
# needs to be installed
259-
Write-Output "needs_install"
260-
}
261-
}
262-
263243
try {
264244
LogSection "Start up PowerShellEditorServices"
265245
Log "Importing PowerShellEditorServices"
266246

267-
if ($isPS5orLater) {
268-
Import-Module PowerShellEditorServices -RequiredVersion $parsedVersion -ErrorAction Stop
269-
}
270-
else {
271-
Import-Module PowerShellEditorServices -Version $parsedVersion -ErrorAction Stop
272-
}
247+
Import-Module PowerShellEditorServices -ErrorAction Stop
273248

274249
# Locate available port numbers for services
275250
Log "Searching for available socket port for the language service"

0 commit comments

Comments
 (0)