Skip to content

Commit b3240de

Browse files
Copiloteleanorjboyd
andcommitted
Use shorter -c flag for PowerShell command
Changed from -Command to -c as suggested in review. Co-authored-by: eleanorjboyd <[email protected]>
1 parent 2c3f829 commit b3240de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/features/terminal/shells/pwsh/pwshStartup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function isPowerShellInstalled(shell: string): Promise<boolean> {
6565
*/
6666
async function getPowerShellVersion(shell: 'powershell' | 'pwsh'): Promise<string | undefined> {
6767
try {
68-
const command = `${shell} -Command "\$PSVersionTable.PSVersion.Major"`;
68+
const command = `${shell} -c '\$PSVersionTable.PSVersion.Major'`;
6969
const versionOutput = await runCommand(command);
7070
if (versionOutput && !isNaN(Number(versionOutput))) {
7171
return versionOutput;

0 commit comments

Comments
 (0)