mirror of
				https://github.com/hiskang/acme.sh
				synced 2025-10-31 10:27:22 +00:00 
			
		
		
		
	Added --force-color to enforce the use of ANSI Color. Issue #1557
This commit is contained in:
		
							parent
							
								
									03f4518da9
								
							
						
					
					
						commit
						e32b3aac22
					
				
							
								
								
									
										12
									
								
								acme.sh
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								acme.sh
									
									
									
									
									
								
							| @ -124,21 +124,21 @@ if [ -t 1 ]; then | |||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| __green() { | __green() { | ||||||
|   if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" ]; then |   if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" -o "${ACME_FORCE_COLOR}" = "1" ]; then | ||||||
|     printf '\033[1;31;32m' |     printf '\033[1;31;32m' | ||||||
|   fi |   fi | ||||||
|   printf -- "%b" "$1" |   printf -- "%b" "$1" | ||||||
|   if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" ]; then |   if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" -o "${ACME_FORCE_COLOR}" = "1" ]; then | ||||||
|     printf '\033[0m' |     printf '\033[0m' | ||||||
|   fi |   fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| __red() { | __red() { | ||||||
|   if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" ]; then |   if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" -o "${ACME_FORCE_COLOR}" = "1" ]; then | ||||||
|     printf '\033[1;31;40m' |     printf '\033[1;31;40m' | ||||||
|   fi |   fi | ||||||
|   printf -- "%b" "$1" |   printf -- "%b" "$1" | ||||||
|   if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" ]; then |   if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" -o "${ACME_FORCE_COLOR}" = "1" ]; then | ||||||
|     printf '\033[0m' |     printf '\033[0m' | ||||||
|   fi |   fi | ||||||
| } | } | ||||||
| @ -5501,6 +5501,7 @@ Parameters: | |||||||
|   --ca-path                         Specifies directory containing CA certificates in PEM format, used by wget or curl. |   --ca-path                         Specifies directory containing CA certificates in PEM format, used by wget or curl. | ||||||
|   --nocron                          Only valid for '--install' command, which means: do not install the default cron job. In this case, the certs will not be renewed automatically. |   --nocron                          Only valid for '--install' command, which means: do not install the default cron job. In this case, the certs will not be renewed automatically. | ||||||
|   --no-color                        Do not output color text. |   --no-color                        Do not output color text. | ||||||
|  |   --force-color                     Force output of color text. Useful for non-interactive use with the aha tool for HTML E-Mails. | ||||||
|   --ecc                             Specifies to use the ECC cert. Valid for '--install-cert', '--renew', '--revoke', '--toPkcs' and '--createCSR' |   --ecc                             Specifies to use the ECC cert. Valid for '--install-cert', '--renew', '--revoke', '--toPkcs' and '--createCSR' | ||||||
|   --csr                             Specifies the input csr. |   --csr                             Specifies the input csr. | ||||||
|   --pre-hook                        Command to be run before obtaining any certificates. |   --pre-hook                        Command to be run before obtaining any certificates. | ||||||
| @ -5966,6 +5967,9 @@ _process() { | |||||||
|       --no-color) |       --no-color) | ||||||
|         export ACME_NO_COLOR=1 |         export ACME_NO_COLOR=1 | ||||||
|         ;; |         ;; | ||||||
|  |       --force-color) | ||||||
|  |         export ACME_FORCE_COLOR=1 | ||||||
|  |         ;; | ||||||
|       --ecc) |       --ecc) | ||||||
|         _ecc="isEcc" |         _ecc="isEcc" | ||||||
|         ;; |         ;; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user