refactor: use an array for m4b_tool_bin to prevent word-splitting issues in command execution
This commit is contained in:
		
							parent
							
								
									39a341d193
								
							
						
					
					
						commit
						4caa040cf8
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -4,6 +4,8 @@ set -eufo pipefail
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# CONSTANTS
 | 
					# CONSTANTS
 | 
				
			||||||
declare -r script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 | 
					declare -r script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 | 
				
			||||||
 | 
					# Use an array for the executable to avoid word-splitting issues
 | 
				
			||||||
 | 
					declare -ra m4b_tool_bin=(nix run github:sandreas/m4b-tool#m4b-tool-libfdk --)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# VARS
 | 
					# VARS
 | 
				
			||||||
LEADING_ZEROES=2
 | 
					LEADING_ZEROES=2
 | 
				
			||||||
| 
						 | 
					@ -178,7 +180,7 @@ m4b-merge() {
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  args+=("--output-file=${output_file}" -- "${source_dir}")
 | 
					  args+=("--output-file=${output_file}" -- "${source_dir}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  nix run github:sandreas/m4b-tool#m4b-tool-libfdk -- "${args[@]}"
 | 
					  "${m4b_tool_bin[@]}" "${args[@]}"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
main() {
 | 
					main() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue