Fix podman machine ssh command
Signed-off-by: Shion Tanaka <shtanaka@redhat.com>
This commit is contained in:
		
							parent
							
								
									1b8bd0df3c
								
							
						
					
					
						commit
						83fa4843f6
					
				| 
						 | 
					@ -57,10 +57,8 @@ func ssh(cmd *cobra.Command, args []string) error {
 | 
				
			||||||
	// provided the VM name.  If so, we check.  The VM name,
 | 
						// provided the VM name.  If so, we check.  The VM name,
 | 
				
			||||||
	// if provided, must be in args[0].
 | 
						// if provided, must be in args[0].
 | 
				
			||||||
	if len(args) > 0 {
 | 
						if len(args) > 0 {
 | 
				
			||||||
		validVM, err = provider.IsValidVMName(args[0])
 | 
							// Ignore the error, See https://github.com/containers/podman/issues/21183#issuecomment-1879713572
 | 
				
			||||||
		if err != nil {
 | 
							validVM, _ = provider.IsValidVMName(args[0])
 | 
				
			||||||
			return err
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		if validVM {
 | 
							if validVM {
 | 
				
			||||||
			vmName = args[0]
 | 
								vmName = args[0]
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue