Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

buildFile as taskList dose not work if psake.ps1 is in different dir then the default.ps1 #10

Closed
lanwin opened this Issue · 1 comment

2 participants

@lanwin
Owner

The problem is this snipped in "psake.ps1":

if (-not(test-path $buildFile))
{
    $buildFile = (join-path $scriptPath $buildFile)
} 

This makes the buildFile absolute if it is not found. There are more then one solution to that.

  • Make taskList the default. This would be breaking, but its a better default since the most projects will only have one build file but multiple tasks.
  • Make the path only absolute if the absolute path exists. Not looked yet, this could be problematic in later processing.
  • Only make the path absolute if it ends with ps1
  • Get only the filename when buildFile is moved to taskList

I will send a patch, but would be discus the solution here first.

@damianh
Owner

Well it seems nobody took to this and this script snippet now looks like

if ($buildPath -and (-not(test-path $buildFile))) {
    $absoluteBuildFile = (join-path $scriptPath $buildFile)
    if (test-path $absoluteBuildFile) {
        $buildFile = $absoluteBuildFile
    }
} 

so I am guessing, after all these years, it's no longer an issue.

@damianh damianh closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.