-docs Doesn't Show Tasks From Included Files #41

Closed
bladeoflight16 opened this Issue Jun 15, 2012 · 0 comments

Comments

Projects
None yet
1 participant
Contributor

bladeoflight16 commented Jun 15, 2012

When -docs is passed to psake, Tasks defined in scripts loaded with the Include command are not lists.

Sample:
Paste this into a file named DocsIncludeTest.ps1:

Include .\DocIncludedTestIncluded.ps1

Task Default -Depends IncludedTask

And this into a file named DocIncludedTestIncluded.ps1:

Task IncludedTask {
    Write-Host 'doing included stuff'
}

Execute .\psake.ps1 -BuildFile .\DocsIncludeTest.ps1 -docs

The output is just the banner.

I've made a change to psake.psm1 for my own usage. Basically, the lines that load the included files (338 to 341) just need to happen before the if ($docs) check (line 330). This hasn't caused me any problems yet.

Sorry I haven't actually included a patch. git is still a new and foreign thing to me, and when I tried to create a patch, I had problems.

@damianh damianh pushed a commit that referenced this issue Nov 16, 2013

@bladeoflight16 bladeoflight16 -Moved docs implementation to after Include processing; fixes #41
-Editor automatically removed trailing whitespace (and might have done some tabs --> spaces)
0d33ab9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment