Skip to content

Conversation

@michaelblyons
Copy link
Collaborator

So Windows can run either one

Fixes #204

So Windows can run either one

Fixes SublimeText#204
@michaelblyons michaelblyons added the build system Building of PowerShell files label Dec 9, 2025
Comment on lines 8 to 17
"windows": {
"cmd": ["powershell.exe", "-noprofile", "-ExecutionPolicy", "Bypass", "-file", "$file"],
}
"variants": [
{
"name": "Windows PowerShell (<=5.1)",
"windows": {
"cmd": ["powershell.exe", "-noprofile", "-ExecutionPolicy", "Bypass", "-file", "$file"],
},
},
],
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"variants" doesn't need to be wrapped into "windows"

Suggested change
"windows": {
"cmd": ["powershell.exe", "-noprofile", "-ExecutionPolicy", "Bypass", "-file", "$file"],
}
"variants": [
{
"name": "Windows PowerShell (<=5.1)",
"windows": {
"cmd": ["powershell.exe", "-noprofile", "-ExecutionPolicy", "Bypass", "-file", "$file"],
},
},
],
},
"variants": [
{
"name": "Windows PowerShell (<=5.1)",
"windows": {
"cmd": ["powershell.exe", "-noprofile", "-ExecutionPolicy", "Bypass", "-file", "$file"],
}
}
]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way your version works, there's a "Windows PowerShell" build available here on Linux (but shouldn't be). I'll push a different variation and see what you think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then probably vice versa. What triggered me was duplicate "windows" entry, which I think may be redundant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll try it that way. What was wrong with the current state? Is the main pwsh one missing?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"variants" must be a top-level key. Hence your current revision, despite duplicating "windows" key, does not add the desired entry on Windows platform.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it seems, platform-sepcificly visible variants are not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build system Building of PowerShell files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider updating the build system in Windows

2 participants