Skip to content

Commit

Permalink
Merge pull request #162 from michaeltlombardi/gh-149/main/long-path-docs
Browse files Browse the repository at this point in the history
(GH-149) Add long path info to generated readme
  • Loading branch information
david22swan authored Jun 7, 2021
2 parents 497eee9 + 9f8e674 commit 6661b94
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Ability to set generated modules fixtures to something other than the latest released version of `puppetlabs-pwshlib` on the Forge ([#93](https://github.com/puppetlabs/Puppet.Dsc/issues/93))
- A check to `New-PuppetDscModule` which validates that PSRemoting is enabled and errors clearly if not in order to prevent unexpected execution failures later in the process ([#133](https://github.com/puppetlabs/Puppet.Dsc/issues/133))
- Long file path support information to the requirements section of autogenerated READMEs ([#149](https://github.com/puppetlabs/Puppet.Dsc/issues/149))

### Fixed

Expand Down Expand Up @@ -82,7 +83,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial implementation and release

[Unreleased]: https://github.com/puppetlabs/Puppet.Dsc/compare/0.5.0...main
[unreleased]: https://github.com/puppetlabs/Puppet.Dsc/compare/0.5.0...main
[0.5.0]: https://github.com/puppetlabs/Puppet.Dsc/releases/tag/0.5.0
[0.4.0]: https://github.com/puppetlabs/Puppet.Dsc/releases/tag/0.4.0
[0.3.0]: https://github.com/puppetlabs/Puppet.Dsc/releases/tag/0.3.0
Expand Down
21 changes: 21 additions & 0 deletions src/internal/functions/Get-ReadmeContent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function Get-ReadmeContent {
$PowerShellGetUri = 'https://github.com/PowerShell/PowerShellGet'
$NarrativeDocumentation = 'https://puppetlabs.github.io/iac/news/roadmap/2020/03/30/dsc-announcement.html'
$TroubleshootingDocumentation = 'https://github.com/puppetlabs/Puppet.Dsc#troubleshooting'
$MicrosoftLongPathSupportDocs = 'https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell#enable-long-paths-in-windows-10-version-1607-and-later'
}

Process {
Expand Down Expand Up @@ -90,6 +91,26 @@ This Puppet module includes two important things: the ruby-pwsh library for runn
All of the actual work being done to call the DSC resources vendored with this module is in [this file]($BaseProviderSource) from the `pwshlib` module.
This is important for troubleshooting and bug reporting, but doesn't impact your use of the module except that the end result will be that nothing works, as the dependency is not installed alongside this module!
### Long File Path Support
Several PowerShell modules with DSC Resources end up with _very_ long file paths once vendored, many of which exceed the 260 character limit for file paths.
Luckily in Windows 10 (build 1607+), Windows Server 2016 (build 1607+), and Windows Server 2019 there is now an option for supporting long file paths transparently!
We **strongly recommend** enabling long file path support on any machines using this module to avoid path length issues.
You can set this value using the Puppet ``registry_value`` resource:
``````puppet
registry_value { 'HKLM\System\CurrentControlSet\Control\FileSystem\LongPathsEnabled':
ensure => 'present',
data => [1],
provider => 'registry',
type => 'dword',
}
``````
You can also set this value outside of Puppet by [following the Microsoft documentation]($MicrosoftLongPathSupportDocs).
## Usage
You can specify any of the DSC resources from this module like a normal Puppet resource in your manifests.
Expand Down

0 comments on commit 6661b94

Please sign in to comment.