mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-10-31 23:36:21 +07:00 
			
		
		
		
	Fix grep call in ppa.sh
When distros use DEB822-STYLE .sources file or a custom default list file the list_file is not present, so we check if it exists before calling grep on it
This commit is contained in:
		| @ -59,7 +59,7 @@ update_lists() { | |||||||
|   if [[ -n "$ppa" && -n "$ppa_search" ]]; then |   if [[ -n "$ppa" && -n "$ppa_search" ]]; then | ||||||
|     list="$list_dir"/"$(basename "$(grep -lr "$ppa_search" "$list_dir")")" |     list="$list_dir"/"$(basename "$(grep -lr "$ppa_search" "$list_dir")")" | ||||||
|     status_file=/tmp/"${ppa/\//_}" |     status_file=/tmp/"${ppa/\//_}" | ||||||
|   elif grep -Eq '^deb ' "$list_file"; then |   elif [ -e "$list_file" ] && grep -Eq '^deb ' "$list_file"; then | ||||||
|     list="$list_file" |     list="$list_file" | ||||||
|   fi |   fi | ||||||
|   if [ ! -e "$status_file" ]; then |   if [ ! -e "$status_file" ]; then | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Shivam Mathur
					Shivam Mathur