diff --git a/build/lib/electron.js b/build/lib/electron.js index 99252e4e64a2d..b3ecf6efc2cdc 100644 --- a/build/lib/electron.js +++ b/build/lib/electron.js @@ -115,7 +115,14 @@ exports.config = { darwinBundleDocumentType(['less'], 'Less'), darwinBundleDocumentType(['markdown', 'md', 'mdoc', 'mdown', 'mdtext', 'mdtxt', 'mdwn', 'mkd', 'mkdn'], 'Markdown'), darwinBundleDocumentType(['php'], 'PHP', 'source code'), - darwinBundleDocumentType(['ps1', 'psd1', 'psm1'], 'Powershell', 'script'), + // Adding here the correct file types with UTIs for Powershell files identification on MacOS + darwinBundleDocumentType(['ps1', 'psd1', 'psm1'], 'Powershell', 'script', ['com.microsoft.powershell.script']), + darwinBundleDocumentType(['psm1'], 'Powershell', 'PowerShell module', ['com.microsoft.powershell.psmodulefile']), + darwinBundleDocumentType(['psd1'], 'Powershell', 'PowerShell data file', ['com.microsoft.powershell.psdatafile']), + darwinBundleDocumentType(['pssc'], 'Powershell', 'PowerShell session configuration file', ['com.microsoft.powershell.pssessionconfigfile']), + darwinBundleDocumentType(['psrc'], 'Powershell', 'PowerShell role capability file', ['com.microsoft.powershell.psrolecapabilityfile']), + darwinBundleDocumentType(['psxml', 'ps1xml'], 'Powershell', 'PowerShell XML file', ['com.microsoft.powershell.psxmlfile']), + darwinBundleDocumentType(['cdxml'], 'Powershell', 'PowerShell CIM XML file', ['com.microsoft.powershell.pscimxmlfile']), darwinBundleDocumentType(['py', 'pyi'], 'Python', 'script'), darwinBundleDocumentType(['gemspec', 'rb', 'erb'], 'Ruby', 'source code'), darwinBundleDocumentType(['scss', 'sass'], 'SASS', 'file'), diff --git a/build/lib/electron.ts b/build/lib/electron.ts index da2387f68f637..06aff2ee77e90 100644 --- a/build/lib/electron.ts +++ b/build/lib/electron.ts @@ -132,7 +132,14 @@ export const config = { darwinBundleDocumentType(['less'], 'Less'), darwinBundleDocumentType(['markdown', 'md', 'mdoc', 'mdown', 'mdtext', 'mdtxt', 'mdwn', 'mkd', 'mkdn'], 'Markdown'), darwinBundleDocumentType(['php'], 'PHP', 'source code'), - darwinBundleDocumentType(['ps1', 'psd1', 'psm1'], 'Powershell', 'script'), + // Adding here the correct file types with UTIs for Powershell files identification on MacOS + darwinBundleDocumentType(['ps1', 'psd1', 'psm1'], 'Powershell', 'script', ['com.microsoft.powershell.script']), + darwinBundleDocumentType(['psm1'], 'Powershell', 'PowerShell module', ['com.microsoft.powershell.psmodulefile']), + darwinBundleDocumentType(['psd1'], 'Powershell', 'PowerShell data file', ['com.microsoft.powershell.psdatafile']), + darwinBundleDocumentType(['pssc'], 'Powershell', 'PowerShell session configuration file', ['com.microsoft.powershell.pssessionconfigfile']), + darwinBundleDocumentType(['psrc'], 'Powershell', 'PowerShell role capability file', ['com.microsoft.powershell.psrolecapabilityfile']), + darwinBundleDocumentType(['psxml', 'ps1xml'], 'Powershell', 'PowerShell XML file', ['com.microsoft.powershell.psxmlfile']), + darwinBundleDocumentType(['cdxml'], 'Powershell', 'PowerShell CIM XML file', ['com.microsoft.powershell.pscimxmlfile']), darwinBundleDocumentType(['py', 'pyi'], 'Python', 'script'), darwinBundleDocumentType(['gemspec', 'rb', 'erb'], 'Ruby', 'source code'), darwinBundleDocumentType(['scss', 'sass'], 'SASS', 'file'),