Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6237500

Browse files
authored
Merge pull request #275 from PowerShell/release/0.7.2
Release 0.7.2
2 parents 5d2bde7 + 1f633fd commit 6237500

File tree

5 files changed

+90
-2
lines changed

5 files changed

+90
-2
lines changed

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# vscode-powershell Release History
22

3+
## 0.7.2
4+
### Friday, September 2, 2016
5+
6+
- Fixed #243: Debug adapter process has terminated unexpectedly
7+
- Fixed #264: Add check for OpenSSL on OS X before starting the language service
8+
- Fixed #271: PSScriptAnalyzer settings path isn't being passed along
9+
- Fixed #273: Debugger crashes after multiple runs
10+
- Fixed #274: Extension crashes on Ctrl+Hover
11+
312
## 0.7.1
413
### Tuesday, August 23, 2016
514

‎docs/troubleshooting.md‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Troubleshooting PowerShell Extension Issues
2+
3+
This document contains troubleshooting steps for commonly reported issues when using the
4+
PowerShell extension for Visual Studio Code.
5+
6+
## Mac OS X
7+
8+
### 1. PowerShell IntelliSense does not work, can't debug scripts
9+
10+
The most common problem when the PowerShell extension doesn't work on Mac OS X is that
11+
OpenSSL is not installed. You can check for the installation of OpenSSL by looking for
12+
the following two files:
13+
14+
```
15+
/usr/local/lib/libcrypto.1.0.0.dylib
16+
/usr/local/lib/libssl.1.0.0.dylib
17+
```
18+
19+
The extension should check for these files and direct you to this documentation if you
20+
do not have OpenSSL isntalled.
21+
22+
#### Installing OpenSSL via Homebrew
23+
24+
You can use Homebrew to easily install OpenSSL. First install Homebrew and then run the following command:
25+
26+
```
27+
brew install openssl
28+
```
29+
30+
Restart VS Code after completing the installation and verify that the extension is working correctly.
31+
32+
#### Installing OpenSSL via MacPorts
33+
34+
If you prefer to use [MacPorts](https://www.macports.org/), you can run the following command to install OpenSSL:
35+
36+
```
37+
sudo port install openssl
38+
```
39+
40+
You will need to take an additional step once installation completes:
41+
42+
```
43+
sudo ln -s /opt/local/lib/libcrypto.1.0.0.dylib /usr/local/lib/
44+
sudo ln -s /opt/local/lib/libssl.1.0.0.dylib /usr/local/lib/
45+
```
46+
47+
Thanks to [@MarlonRodriguez](https://github.com/MarlonRodriguez) for the tip!
48+
49+
Restart VS Code after completing the installation and verify that the extension is working correctly.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "PowerShell",
33
"displayName": "PowerShell",
4-
"version": "0.7.1",
4+
"version": "0.7.2",
55
"publisher": "ms-vscode",
66
"description": "Develop PowerShell scripts in Visual Studio Code!",
77
"engines": {

‎src/main.ts‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import net = require('net');
2525

2626
// NOTE: We will need to find a better way to deal with the required
2727
// PS Editor Services version...
28-
var requiredEditorServicesVersion = "0.7.1";
28+
var requiredEditorServicesVersion = "0.7.2";
2929

3030
var powerShellProcess: cp.ChildProcess = undefined;
3131
var languageServerClient: LanguageClient = undefined;
@@ -112,6 +112,26 @@ export function activate(context: vscode.ExtensionContext): void {
112112
}
113113
else if (os.platform() == "darwin") {
114114
powerShellExePath = "/usr/local/bin/powershell";
115+
116+
// Check for OpenSSL dependency on OS X
117+
if (!utils.checkIfFileExists("/usr/local/lib/libcrypto.1.0.0.dylib") ||
118+
!utils.checkIfFileExists("/usr/local/lib/libssl.1.0.0.dylib")) {
119+
var thenable =
120+
vscode.window.showWarningMessage(
121+
"The PowerShell extension will not work without OpenSSL on Mac OS X",
122+
"Show Documentation");
123+
124+
thenable.then(
125+
(s) => {
126+
if (s === "Show Documentation") {
127+
cp.exec("open https://github.com/PowerShell/vscode-powershell/blob/master/docs/troubleshooting.md#1-powershell-intellisense-does-not-work-cant-debug-scripts");
128+
}
129+
});
130+
131+
// Don't continue initializing since Editor Services will not load successfully
132+
console.log("Cannot start PowerShell Editor Services due to missing OpenSSL dependency.");
133+
return;
134+
}
115135
}
116136
else {
117137
powerShellExePath = "/usr/bin/powershell";

‎src/utils.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,14 @@ export function readSessionFile(): EditorServicesSessionDetails {
7979

8080
export function deleteSessionFile() {
8181
fs.unlinkSync(sessionFilePath);
82+
}
83+
84+
export function checkIfFileExists(filePath: string): boolean {
85+
try {
86+
fs.accessSync(filePath, fs.R_OK)
87+
return true;
88+
}
89+
catch (e) {
90+
return false;
91+
}
8292
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /