mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 02:28:09 +00:00 
			
		
		
		
	command/namespace: Move trailing slash check to the end (#5163)
This commit is contained in:
		 Calvin Leung Huang
					Calvin Leung Huang
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							fb2d2de66b
						
					
				
				
					commit
					ac10e2078e
				
			| @@ -85,12 +85,14 @@ func (c *NamespaceCreateCommand) Run(args []string) int { | ||||
| 		return 2 | ||||
| 	} | ||||
|  | ||||
| 	if !strings.HasSuffix(namespacePath, "/") { | ||||
| 		namespacePath = namespacePath + "/" | ||||
| 	} | ||||
| 	if c.flagNamespace != notSetNamespace { | ||||
| 		namespacePath = path.Join(c.flagNamespace, namespacePath) | ||||
| 	} | ||||
|  | ||||
| 	if !strings.HasSuffix(namespacePath, "/") { | ||||
| 		namespacePath = namespacePath + "/" | ||||
| 	} | ||||
|  | ||||
| 	// Output full path | ||||
| 	c.UI.Output(fmt.Sprintf("Success! Namespace created at: %s", namespacePath)) | ||||
| 	return 0 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user