-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
WebApp:Publish-AzWebapp doesn't handle relative paths properly #18028
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp, @AzureAppServiceCLI. Issue DetailsDescriptionPublic-AzWebapp interprets relative paths incorrectly. Any relative path I use is appended to c:\windows\system32. There was a previous report of this which was closed without a proper explanation. PS > Publish-AzWebApp -ResourceGroupName POC -Name Test -ArchivePath ".\TestApp\TestApp.zip" -Force Issue script & Debug outputPS c:\Users\XXX\src> Publish-AzWebApp -ResourceGroupName POC -Name Test -ArchivePath ".\TestApp\TestApp.zip" -Force
Publish-AzWebApp: Could not find a part of the path 'C:\Windows\system32\TestApp\TestApp.zip'. Environment dataName Value
---- -----
PSVersion 7.2.3
PSEdition Core
GitCommitId 7.2.3
OS Microsoft Windows 10.0.22000
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0 Module versionsModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.2.0 Az.Websites {Add-AzWebAppAccessRestrictionRule, Add-AzWebAppTrafficRouting, Edit-AzWebAppBackupConfiguration, Enter-AzWebAppContainerPSSession…} Error outputHistoryId: 206
Message : Could not find a part of the path 'C:\Windows\system32\TestApp\TestApp.zip'.
StackTrace : at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.File.OpenRead(String path)
at Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.PublishAzureWebAppCmdlet.<>c__DisplayClass13_0.<ExecuteCmdlet>b__0()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ConfirmAction(Boolean force, String continueMessage, String processMessage, String target, Action action, Func`1 useShouldContinue)
at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.ConfirmAction(Boolean force, String continueMessage, String processMessage, String target, Action action)
at Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.PublishAzureWebAppCmdlet.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.<ExecuteSynchronouslyOrAsJob>b__3_0(T c)
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor)
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.IO.DirectoryNotFoundException
InvocationInfo : {Publish-AzWebApp}
Line : Publish-AzWebApp -ResourceGroupName POC -Name Test -ArchivePath ".\TestApp\TestApp.zip" -Force
Position : At line:1 char:1
+ Publish-AzWebApp -ResourceGroupName POC -Name Test -Arc …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 206
|
Description
Public-AzWebapp interprets relative paths incorrectly.
Any relative path I use is appended to c:\windows\system32. There was a previous report of this which was closed without a proper explanation.
PS > Publish-AzWebApp -ResourceGroupName POC -Name Test -ArchivePath ".\TestApp\TestApp.zip" -Force
Publish-AzWebApp: Could not find a part of the path 'C:\Windows\system32\TestApp\TestApp.zip'.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: