* Help text for all (non-script) programs, so no more:
$ nix-instantiate --help error: unknown flag `--help` Try `nix-instantiate --help' for more information. :-)
This commit is contained in:
		
							parent
							
								
									905d5b91fa
								
							
						
					
					
						commit
						078e20885e
					
				
					 14 changed files with 126 additions and 32 deletions
				
			
		|  | @ -12,14 +12,12 @@ | |||
| typedef void (* Operation) (Strings opFlags, Strings opArgs); | ||||
| 
 | ||||
| 
 | ||||
| static void printHelp() | ||||
| void printHelp() | ||||
| { | ||||
|     cout << string((char *) helpText, sizeof helpText); | ||||
|     exit(0); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| static Path checkPath(const Path & arg) | ||||
| { | ||||
|     return arg; /* !!! check that arg is in the store */ | ||||
|  | @ -276,12 +274,6 @@ void run(Strings args) | |||
|             op = opInit; | ||||
|         else if (arg == "--verify") | ||||
|             op = opVerify; | ||||
|         else if (arg == "--verbose" || arg == "-v") | ||||
|             verbosity = (Verbosity) ((int) verbosity + 1); | ||||
|         else if (arg == "--keep-failed" || arg == "-K") | ||||
|             keepFailed = true; | ||||
|         else if (arg == "--help") | ||||
|             printHelp(); | ||||
|         else if (arg[0] == '-') | ||||
|             opFlags.push_back(arg); | ||||
|         else | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue