- Notifications
You must be signed in to change notification settings - Fork7.7k
Build: Resolve -Output path to allow for relative paths#25623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Build: Resolve -Output path to allow for relative paths#25623
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -434,9 +434,14 @@ Fix steps: | |||
return | |||
} | |||
# resolve the output path to an absolute path. We cannot use Resolve-Path here because it will error if the path does not exist. | |||
if ($Output) { | |||
$OutputPath = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
How about directly changing$Output
and leave the rest unchanged?
$OutputPath=$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Output) | |
$Output=$PSCmdlet.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I didn't want it to carry over into the psoptions state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Not sure I understand it. We still assignOutput=$OutputPath
when constructing$script:Options
, right?
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for7 days. |
If you do
Start-PSBuild -Output output
it will fail as relative paths do not resolve correctly and are incorrectly resolved relative to the primary project root.This PR performes a PowerShell path resolution on output so that relative paths, including PSProvider paths such as TEMP:/debug can be used.