Skip to content

Commit fc2fa77

Browse files
authored
[AKS] fix a bug in zip on windows (#20832)
* [AKS] fix a bug in zip on windows * update changelog * update changelog
1 parent d2fbb74 commit fc2fa77

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Aks/Aks/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Fixed the issue that Invoke-AzAksRunCommand will fail when the directory for parameter CommandContextAttachment contains sub-directories. [#20734]
2122
* Added parameter `-AadProfile` for `New-AzAksCluster` and `Set-AzAksCluster`
2223
* Added parameter `-NodeHostGroupID` for `New-AzAksCluster` and parameter `-HostGroupID` for `New-AzAksNodePool`
2324

src/Aks/Aks/Commands/RunAzureRmAksCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ private string GetCommandContext()
154154
{
155155
foreach (string filepath in filesToAttach)
156156
{
157-
var relativePath = filepath.Replace(rootDirectory, "").Trim('/').Trim('\\');
157+
var relativePath = filepath.Replace(rootDirectory, "").Replace('\\', '/').Trim('/');
158158
var memoryZipFile = archive.CreateEntry(relativePath);
159159
var fileContent = File.ReadAllText(filepath);
160160
using (var entryStream = memoryZipFile.Open())

0 commit comments

Comments
 (0)