mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-03 21:02:34 +00:00 
			
		
		
		
	Help the user figure out the problem when using -d to delete
This commit is contained in:
		@@ -1187,7 +1187,12 @@ sub parse_args {
 | 
			
		||||
            if ($updateid_passed) {
 | 
			
		||||
                # Updateid was passed, check flags allowed with update id
 | 
			
		||||
                if ($option_flag !~ /^--delete$|^-a$|^--activate$/) {
 | 
			
		||||
                    return ([ 1, "Invalid option specified when an update id is provided: $option_flag" ]);
 | 
			
		||||
                    my $optional_help_msg = "";
 | 
			
		||||
                    if ($option_flag == "-d") {
 | 
			
		||||
                        # For this special case, -d was changed to pass in a directory.
 | 
			
		||||
                        $optional_help_msg = "Did you mean --delete?"
 | 
			
		||||
                    }
 | 
			
		||||
                    return ([ 1, "Invalid option specified when an update id is provided: $option_flag. $optional_help_msg" ]);
 | 
			
		||||
                }
 | 
			
		||||
                my $action = "activate";
 | 
			
		||||
                if ($option_flag =~ /^--delete$/) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user