Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert relative OutPath to absolute path in Ensure-PdpFilePath #64

Closed
martinsuchan opened this issue Oct 2, 2017 · 2 comments
Closed
Assignees

Comments

@martinsuchan
Copy link

In ConvertFrom-ExistingSubmission.ps1 if user enters relative -OutPath and launches the script from non-default folder, the OutPath folder is created in a wrong place and the $xml.Save($filePath) throws an exception because it can't find the target nested folder.

.\ConvertFrom-ExistingSubmission.ps1 -AppId "ABCDEFGH" -Release "Master" -PdpFileName "PDP.xml" -OutPath "PDPOut"

This creates the OutPath folder in Extensions directory, but $xml.Save($filePath) expects it in StoreBroker root directory.

Expected solution: Ensure-PdpFilePath should return absolute path where the OutPath folder was created.

@HowardWolosky
Copy link
Member

Thanks for the report.
Looks like we should be using Resolve-UnverifiedPath here since it's calling out to a non-PowerShell command ($xml.Save()). That command was introduced in this commit because package upload/download also use non-native command which means that they don't handle relative paths correctly.

@danbelcher-MSFT - Can you update those scripts to leverage Resolve-UnverifiedPath, and then make sure that there aren't any other code-paths in StoreBroker that take in a path to a non-native PowerShell method that haven't been resolved first?

Thanks.

@danbelcher-MSFT
Copy link
Contributor

Closing this issue as resolved based on the linked commit. Please let us know if you are still experiencing this issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants