fix(nixos-hosts): use arithmetic comparison in argument loop
Replaces `[[ $# > 0 ]]` with `(( $# > 0 ))` for clarity and correctness. This ensures improved readability and adherence to best practices in Bash scripting.
This commit is contained in:
		
							parent
							
								
									b8c83bd15b
								
							
						
					
					
						commit
						ba867efe01
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -113,8 +113,7 @@ missing_opt_value() {
 | 
				
			||||||
	log_fatal "Option $1 requires a value"
 | 
						log_fatal "Option $1 requires a value"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# shellcheck disable=SC2154
 | 
					while (( $# > 0 )); do
 | 
				
			||||||
while [[ $# > 0 ]]; do
 | 
					 | 
				
			||||||
	case "$1" in
 | 
						case "$1" in
 | 
				
			||||||
		-h|--help)
 | 
							-h|--help)
 | 
				
			||||||
			opt_help=true
 | 
								opt_help=true
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue