Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
JustinGrote wants to merge1 commit intoPowerShell:master
base:master
Choose a base branch
Loading
fromJustinGrote:build/ResolveStartPSBuildOutputPath

Conversation

JustinGrote
Copy link
Contributor

If you doStart-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.

@JustinGroteJustinGrote requested review fromjshigetomi anda team ascode ownersMay 31, 2025 01:57
@iSazonoviSazonov added the CL-BuildPackagingIndicates that a PR should be marked as a build or packaging change in the Change Log labelMay 31, 2025
@@ -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)
Copy link
Member

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?

Suggested change
$OutputPath=$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Output)
$Output=$PSCmdlet.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Output)

Copy link
ContributorAuthor

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.

Copy link
Member

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?

@microsoft-github-policy-serviceMicrosoft GitHub Policy Service
Copy link
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for7 days.
Maintainer, please provide feedback and/or mark it asWaiting on Author

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

@daxian-dbwdaxian-dbwdaxian-dbw left review comments

@jshigetomijshigetomiAwaiting requested review from jshigetomijshigetomi is a code owner

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
CL-BuildPackagingIndicates that a PR should be marked as a build or packaging change in the Change LogReview - NeededThe PR is being reviewed
Projects
Status: PR In Progress
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@JustinGrote@daxian-dbw@iSazonov

[8]ページ先頭

©2009-2025 Movatter.jp