nix run: Fix "flag '--command' requires 2 argument(s)"
This commit is contained in:
		
							parent
							
								
									4eb9e20028
								
							
						
					
					
						commit
						1ff01187e2
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -30,8 +30,8 @@ struct CmdRun : InstallablesCommand
 | 
				
			||||||
            .longName("command")
 | 
					            .longName("command")
 | 
				
			||||||
            .shortName('c')
 | 
					            .shortName('c')
 | 
				
			||||||
            .description("command and arguments to be executed; defaults to 'bash'")
 | 
					            .description("command and arguments to be executed; defaults to 'bash'")
 | 
				
			||||||
            .arity(ArityAny)
 | 
					 | 
				
			||||||
            .labels({"command", "args"})
 | 
					            .labels({"command", "args"})
 | 
				
			||||||
 | 
					            .arity(ArityAny)
 | 
				
			||||||
            .handler([&](std::vector<std::string> ss) {
 | 
					            .handler([&](std::vector<std::string> ss) {
 | 
				
			||||||
                if (ss.empty()) throw UsageError("--command requires at least one argument");
 | 
					                if (ss.empty()) throw UsageError("--command requires at least one argument");
 | 
				
			||||||
                command = ss;
 | 
					                command = ss;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue