Skip to content

Allow detection of powershell-preview snap#240054

Merged
Tyriar merged 1 commit intomicrosoft:mainfrom
KexyBiscuit:regex-is-hard-pwsh
Feb 21, 2025
Merged

Allow detection of powershell-preview snap#240054
Tyriar merged 1 commit intomicrosoft:mainfrom
KexyBiscuit:regex-is-hard-pwsh

Conversation

@KexyBiscuit
Copy link
Contributor

@KexyBiscuit KexyBiscuit commented Feb 8, 2025

The executable name can be pwsh, pwsh-preview, powershell, or powershell-preview. The new regular expression matches them all.

Fixes #240053.

@KexyBiscuit
Copy link
Contributor Author

KexyBiscuit commented Feb 8, 2025

@KexyBiscuit

This comment was marked as outdated.

KexyBiscuit added a commit to AOSC-Tracking/vscodium that referenced this pull request Feb 11, 2025
KexyBiscuit added a commit to AOSC-Tracking/vscodium that referenced this pull request Feb 11, 2025
The powershell-preview snap provides `powershell-preview` command, make
the regular expression detects that too.

```shell
kexybiscuit@ProArtB550-CREATOR:~$ snap info powershell-preview
name:      powershell-preview
summary:   PowerShell for every system!
publisher: Microsoft PowerShell✓
store-url: https://snapcraft.io/powershell-preview
contact:   https://github.com/powershell/powershell
license:   unset
description: |
  PowerShell is an automation and configuration management platform.
  It consists of a cross-platform (Windows, Linux, and macOS)
  command-line shell and associated scripting language.

  See https://docs.microsoft.com/powershell/scripting/powershell-support-lifecycle for support
  details.
commands:
  - powershell-preview
snap-id:      D0A7ph8R6LBXQ8rgs2ad06s8tjyeowsd
tracking:     latest/stable
refresh-date: today at 14:12 CST
channels:
  latest/stable:    7.6.0-preview.2 2025-01-27 (165) 77MB classic
  latest/candidate: ↑
  latest/beta:      ↑
  latest/edge:      7.4.0-preview.3 2023-05-03 (142) 72MB classic
installed:          7.6.0-preview.2            (165) 77MB classic
kexybiscuit@ProArtB550-CREATOR:~$ sudo snap install powershell-preview --classic
2025-02-08T14:12:33+08:00 INFO Waiting for automatic snapd restart...
powershell-preview 7.6.0-preview.2 from Microsoft PowerShell✓ installed
kexybiscuit@ProArtB550-CREATOR:~$ command -v powershell-preview
/snap/bin/powershell-preview
```

Co-authored-by: Garfield Lee <[email protected]>
Signed-off-by: Kexy Biscuit <[email protected]>
@KexyBiscuit KexyBiscuit changed the title Fix PowerShell executable name detection. Allow detection of powershell-preview snap Feb 14, 2025
@KexyBiscuit
Copy link
Contributor Author

@Tyriar this is a follow-up of #240234 (actually a duplicate of #240053), please review.

@Tyriar Tyriar assigned Tyriar and unassigned aiday-mar Feb 14, 2025
@Tyriar Tyriar added this to the February 2025 milestone Feb 14, 2025
@Tyriar Tyriar enabled auto-merge February 21, 2025 15:04
@Tyriar Tyriar merged commit 13369a2 into microsoft:main Feb 21, 2025
7 checks passed
@KexyBiscuit KexyBiscuit deleted the regex-is-hard-pwsh branch February 21, 2025 23:39
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this pull request Apr 7, 2025
Drop upstreamed patch from microsoft/vscode#240054.

Co-authored-by: 白铭骢 (Mingcong Bai) (@MingcongBai) <[email protected]>
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this pull request Apr 7, 2025
Drop upstreamed patch from microsoft/vscode#240054.

Co-authored-by: 白铭骢 (Mingcong Bai) (@MingcongBai) <[email protected]>
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Apr 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When pwsh is the login shell, Code no longer starts it as the login shell, resulting in login profiles no longer executed

4 participants