Skip to content

Conversation

@reinhart1010
Copy link
Collaborator

@reinhart1010 reinhart1010 commented Jan 6, 2026

Checklist

  • The page(s) are in the correct platform directories: common, linux, osx, windows, sunos, android, etc.
  • The page description(s) have links to documentation or a homepage.
  • The page(s) follow the content guidelines.
  • The page(s) follow the style guide.
  • The PR contains at most 5 new pages.
  • The PR is authored by me, or has been human-reviewed if it was created with AI or machine translation software.
  • The PR title conforms to the recommended templates.
  • Version of the command being documented (if known): PowerShell 5.1.26100.7462

I'm making significant changes to the test scripts to support Windows development environments by rewriting scripts/test.sh into PowerShell, then modify the npm test command (as used in Git pre-commit hooks) to check the host operating system before loading the correct Bash/PowerShell file.

This is because bash in Windows 10 and Windows 11 users would trigger the WSL environment instead of bash in Cygwin, Git Bash, or Msys2, and will break if necessary Node.js and Python tools are not present in both Windows and WSL.

In addition to that, pages.en is explicitly excluded in the Bash script (similar to #18653) because Git would most likely not to resolve symbolic links in Windows (and hence WSL while accessing Windows directories) for technical reasons (https://gitforwindows.org/symbolic-links.html). pages.en is treated as a normal file in the existing Bash script, and will trigger TLDR107 errors for the specific file.

Note:

@github-actions github-actions bot added the tooling Helper tools, scripts and automated processes. label Jan 6, 2026
@tldr-bot
Copy link

tldr-bot commented Jan 6, 2026

The build for this PR failed with the following error(s) at commit
dd3e9fdc733622e595cf6722126a8920551c993c:

scripts/test.sh: line 91: ./pages.ar: Is a directory
scripts/test.sh: line 91: ./pages.bn: Is a directory
scripts/test.sh: line 91: ./pages.bs: Is a directory
scripts/test.sh: line 91: ./pages.ca: Is a directory
scripts/test.sh: line 91: ./pages.cs: Is a directory
scripts/test.sh: line 91: ./pages.da: Is a directory
scripts/test.sh: line 91: ./pages.de: Is a directory
scripts/test.sh: line 91: ./pages.el: Is a directory
scripts/test.sh: line 91: ./pages.es: Is a directory
scripts/test.sh: line 91: ./pages.fa: Is a directory
scripts/test.sh: line 91: ./pages.fi: Is a directory
scripts/test.sh: line 91: ./pages.fr: Is a directory
scripts/test.sh: line 91: ./pages.hi: Is a directory
scripts/test.sh: line 91: ./pages.id: Is a directory
scripts/test.sh: line 91: ./pages.it: Is a directory
scripts/test.sh: line 91: ./pages.ja: Is a directory
scripts/test.sh: line 91: ./pages.ko: Is a directory
scripts/test.sh: line 91: ./pages.lo: Is a directory
scripts/test.sh: line 91: ./pages.ml: Is a directory
scripts/test.sh: line 91: ./pages.ne: Is a directory
scripts/test.sh: line 91: ./pages.nl: Is a directory
scripts/test.sh: line 91: ./pages.no: Is a directory
scripts/test.sh: line 91: ./pages.pl: Is a directory
scripts/test.sh: line 91: ./pages.pt_BR: Is a directory
scripts/test.sh: line 91: ./pages.pt_PT: Is a directory
scripts/test.sh: line 91: ./pages.ro: Is a directory
scripts/test.sh: line 91: ./pages.ru: Is a directory
scripts/test.sh: line 91: ./pages.sr: Is a directory
scripts/test.sh: line 91: ./pages.sv: Is a directory
scripts/test.sh: line 91: ./pages.ta: Is a directory
scripts/test.sh: line 91: ./pages.th: Is a directory
scripts/test.sh: line 91: ./pages.tr: Is a directory
scripts/test.sh: line 91: ./pages.uk: Is a directory
scripts/test.sh: line 91: ./pages.uz: Is a directory
scripts/test.sh: line 91: ./pages.zh: Is a directory
scripts/test.sh: line 91: ./pages.zh_TW: Is a directory

In scripts/test.sh line 91:
    ([[ -h $f ]] || $f == "pages.en") && continue
                    ^--------------^ SC2284 (error): Use [ x = y ] to compare values (or quote '==' if literal).

For more information:
  https://www.shellcheck.net/wiki/SC2284 -- Use [ x = y ] to compare values (...

Please fix the error(s) and push again.


# Check which PowerShell version available, prefers `pwsh` over `powershell`.
if (Exists("pwsh")) {
$msgs = pwsh "scripts\check-pr.ps1"
Copy link
Member

Choose a reason for hiding this comment

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

This file is missing right?

maybe better to split this PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file is missing right?

maybe better to split this PR?

@sebastiaanspeck It seems the original scripts/check-pr.sh contains regex patterns to check for outdated pages, missing command examples, etc. And there will be differences between the Unix-style and the PowerShell/.NET-style regex patterns.

Since check-pr.sh is meant to be primarily used for GitHub Actions, do you think we need to have a working PowerShell version at this point? I'd prefer to remove CI-related code on the PowerShell script.

@reinhart1010 reinhart1010 marked this pull request as draft January 6, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tooling Helper tools, scripts and automated processes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants