Skip to content

Commit 485ad95

Browse files
committed
Display preview status and version info in the PSIC startup banner
1 parent 26d3821 commit 485ad95

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/session.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,18 @@ export class SessionManager implements Middleware {
191191

192192
if (this.sessionSettings.integratedConsole.suppressStartupBanner) {
193193
this.editorServicesArgs += "-StartupBanner '' ";
194+
} else {
195+
const packageJSON: any = require("../../package.json");
196+
const previewStr = (packageJSON.name.toLowerCase() === "powershell-preview") ? "Preview " : "";
197+
const version = packageJSON.version;
198+
199+
const startupBanner = `
200+
201+
=====> PowerShell ${previewStr}Integrated Console v${version} <=====
202+
203+
`;
204+
205+
this.editorServicesArgs += `-StartupBanner "${startupBanner}" `;
194206
}
195207

196208
if (this.sessionSettings.developer.editorServicesWaitForDebugger) {

0 commit comments

Comments
 (0)