Issues

Issue #10304 duplicate

PowerShell .ps1 files are detected as binary, whereas they are text.

Jeroen Wiert Pluimers
created an issue

These PowerShell related extensions are text files, so if they are regarded as binary in BitBucket, then please make them text:

  • .PS1 – Windows PowerShell shell script
  • .PSD1 – Windows PowerShell data file (for Version 2)
  • .PSM1 – Windows PowerShell module file (for Version 2)
  • .PS1XML – Windows PowerShell format and type definitions
  • .CLIXML - Windows PowerShell serialized data
  • .PSC1 – Windows PowerShell console file
  • .PSSC - Windows PowerShell Session Configuration file

See: https://en.wikipedia.org/wiki/Windows_PowerShell#File_extensions

Notes:

  1. the extensions are case insensitive (I know that Git and Mercurial/HG are case sensitive, so it might be needed to include the permutations of uppercase/lowercase letters in these extensions)
  2. often these files are stored with Unicode BOM U+FEFF (as edited by either PowerShell ISE, PowerGUI, NotePad or other Unicode aware text editors)

An example file that fails is mentioned at https://answers.atlassian.com/questions/330206/why-is-this-ps1-file-being-downloaded-from-my-hg-repository and available from https://bitbucket.org/jeroenp/besharp.net/src/b356056dbf9189ec8297aeaa5575f8e4092fba65/Scripts/NoIP/Login-and-Update-NoIp.ps1

Related to #5453

Comments (1)

  1. Log in to comment