mirror of
				https://github.com/stedolan/jq.git
				synced 2024-05-11 05:55:39 +00:00 
			
		
		
		
	Make jq --version print to stdout, not stderr
This commit is contained in:
		
							
								
								
									
										2
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.c
									
									
									
									
									
								
							@@ -244,7 +244,7 @@ int main(int argc, char* argv[]) {
 | 
			
		||||
    } else if (isoption(argv[i], 'h', "help")) {
 | 
			
		||||
      usage();
 | 
			
		||||
    } else if (isoption(argv[i], 'V', "version")) {
 | 
			
		||||
      fprintf(stderr, "jq-%s\n", JQ_VERSION);
 | 
			
		||||
      printf("jq-%s\n", JQ_VERSION);
 | 
			
		||||
      return 0;
 | 
			
		||||
    } else {
 | 
			
		||||
      fprintf(stderr, "%s: Unknown option %s\n", progname, argv[i]);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user