Skip to content

Fix help function to check if less is available before using - #11737

Merged
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:help-less
Feb 3, 2020
Merged

Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:help-less

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Jan 31, 2020 •

Copy link
Copy Markdown
Member

PR Summary

The help function assumes on non-Windows that less is available as a pager. However, on some Linux systems, less is not installed by default so using help fails that less is not found. FIx is to check if less is available before using and, if not, just output the help text instead of paging.

PR Context

Fix #9830

PR Checklist

@TravisEz13 Travis Plunk (TravisEz13) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Feb 3, 2020
@TravisEz13

Copy link
Copy Markdown
Member

Should we continue to include less in the docker images?

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Travis Plunk (@TravisEz13) I would think most use of docker images are non-interactive, so less is probably not needed, but don't have a strong opinion on this.

@TravisEz13
Travis Plunk (TravisEz13) merged commit 6c6c9cc into PowerShell:master Feb 3, 2020
@ghost

Copy link
Copy Markdown

🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

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

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Are the Utils PowerShell Core Depends on in Linux managed and published?

3 participants