mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 02:28:09 +00:00 
			
		
		
		
	Fix debug bundle panic on Windows (#14399)
* Fix debug bundle panic on Windows * Add changelog entry
This commit is contained in:
		
							
								
								
									
										3
									
								
								changelog/14399.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								changelog/14399.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| ```release-note:bug | ||||
| debug: Fix panic when capturing debug bundle on Windows | ||||
| ``` | ||||
| @@ -349,7 +349,7 @@ func (c *DebugCommand) generateIndex() error { | ||||
|  | ||||
| 		dir, file := filepath.Split(relPath) | ||||
| 		if len(dir) != 0 { | ||||
| 			dir = strings.TrimSuffix(dir, "/") | ||||
| 			dir = filepath.Clean(dir) | ||||
| 			filesArr := outputLayout[dir].(map[string]interface{})["files"] | ||||
| 			outputLayout[dir].(map[string]interface{})["files"] = append(filesArr.([]string), file) | ||||
| 		} else { | ||||
| @@ -448,7 +448,7 @@ func (c *DebugCommand) preflight(rawArgs []string) (string, error) { | ||||
| 	} | ||||
|  | ||||
| 	// Strip trailing slash before proceeding | ||||
| 	c.flagOutput = strings.TrimSuffix(c.flagOutput, "/") | ||||
| 	c.flagOutput = filepath.Clean(c.flagOutput) | ||||
|  | ||||
| 	// If compression is enabled, trim the extension so that the files are | ||||
| 	// written to a directory even if compression somehow fails. We ensure the | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dave May
					Dave May