Skip to content

Discover new PowerShell installations, fix startup issue with Windows PowerShell #2238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 48 commits into from
Oct 29, 2019
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e89e1ac
Fix original startup issue
Oct 8, 2019
b115bb2
Add finder class
Oct 9, 2019
190a9ff
Hook up new PowerShell searcher
Oct 9, 2019
66961d4
Add documentation, fix style
Oct 10, 2019
3457dee
Style fixes
Oct 10, 2019
e84c8e8
Disable .NET global tool discovery
Oct 10, 2019
ff872e5
Fix bug with finding ps core
Oct 10, 2019
71c86e8
Fix issue when PS core dir doesn't exist
Oct 10, 2019
518579c
Actually fix
Oct 10, 2019
0263209
Fix tests
Oct 10, 2019
835fc83
Add default platform
Oct 14, 2019
fcde194
Add new APIs and use them in places
Oct 14, 2019
e781021
Use new apis in tests
Oct 14, 2019
4745b00
Fix text issue
Oct 15, 2019
bd7ba7f
Remove pwsh refs
Oct 15, 2019
ea02656
More tests
Oct 15, 2019
fa9797a
tests
Oct 15, 2019
ab6eba3
tests
Oct 15, 2019
0d24866
tests
Oct 15, 2019
ad49daf
Testing and bitness refactor
Oct 23, 2019
e07adeb
Add more tests
Oct 23, 2019
79a0cec
Add tests for other platforms
Oct 23, 2019
86c2e16
Add more platform tests
Oct 23, 2019
41f8b18
Fix 'winddir'
Oct 23, 2019
852c85c
Attempt to bring tests cross-plat
rjmholt Oct 23, 2019
3a06286
Fix path issue
rjmholt Oct 23, 2019
06a16d2
Make path-based tests version-specific
rjmholt Oct 23, 2019
5fd7f83
Fix path length issues
rjmholt Oct 23, 2019
66ddfdb
Add new bits
Oct 24, 2019
0afeed0
Simply PowerShell missing logic
rjmholt Oct 24, 2019
15da0ee
Fix type issue
rjmholt Oct 24, 2019
893db64
Merge branch 'master' into fix-startup-shell-selection
rjmholt Oct 24, 2019
90a7692
Remove unused exception class
Oct 24, 2019
b68bbc9
Use noprofile to find MSIX
Oct 24, 2019
ff081d4
Add link to PowerShell installation instructions
Oct 25, 2019
731e651
Finalise message
rjmholt Oct 25, 2019
fe7a21c
Update package.json
rjmholt Oct 25, 2019
b3c7696
Remove laziness, add preview MSIX detection
Oct 29, 2019
24a3a4b
Remove unused method
Oct 29, 2019
aa91a24
Fix test issues
Oct 29, 2019
7a9c5a8
Fix test bug on *nix
Oct 29, 2019
d1f8933
Fix code factor issue
Oct 29, 2019
6b04fbe
Better destructuring
Oct 29, 2019
89e8a8d
Improve comments
Oct 29, 2019
04046ec
Update src/session.ts
rjmholt Oct 29, 2019
bb95c19
Rename MSIX to (Store)
Oct 29, 2019
50caf85
Factor out test platform
Oct 29, 2019
4d095f0
Merge branch 'master' into fix-startup-shell-selection
rjmholt Oct 29, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/out/test/**/*.js"],
"preLaunchTask": "Build"
"preLaunchTask": "Build",
"skipFiles": [
"${workspaceFolder}/node_modules/**/*",
"${workspaceFolder}/lib/**/*",
"/private/var/folders/**/*",
"<node_internals>/**/*"
]
},
{
"name": "Attach",
Expand Down
145 changes: 145 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,18 @@
},
"devDependencies": {
"@types/mocha": "~5.2.7",
"@types/mock-fs": "~4.10.0",
"@types/node": "~10.11.0",
"@types/node-fetch": "^2.5.2",
"@types/rewire": "^2.5.28",
"@types/semver": "^6.0.2",
"@types/node-fetch": "~2.5.2",
"@types/rewire": "~2.5.28",
"@types/semver": "~6.0.2",
"@types/sinon": "~7.5.0",
"mocha": "~5.2.0",
"mocha-junit-reporter": "~1.23.1",
"mocha-multi-reporters": "~1.1.7",
"mock-fs": "~4.10.2",
"rewire": "~4.0.1",
"sinon": "~7.5.0",
"tslint": "~5.20.0",
"typescript": "~3.5.3",
"vsce": "~1.67.1",
Expand Down
23 changes: 23 additions & 0 deletions src/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,29 @@ export class Logger implements ILogger {
});
}

public async writeAndShowErrorWithActions(
message: string,
actions: Array<{ prompt: string; action: () => Promise<void> }>) {
this.writeError(message);

const fullActions = [
...actions,
{ prompt: "Show Logs", action: async () => { this.showLogPanel(); } },
];

const actionKeys: string[] = fullActions.map((action) => action.prompt);

const choice = await vscode.window.showErrorMessage(message, ...actionKeys);
if (choice) {
for (const action of fullActions) {
if (choice === action.prompt) {
await action.action();
return;
}
}
}
}

public startNewLog(minimumLogLevel: string = "Normal") {
this.MinimumLogLevel = this.logLevelNameToValue(minimumLogLevel.trim());

Expand Down
Loading