Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"acme.sh --cron --no-color" - prints color #1912

Closed
jmedin1965 opened this issue Nov 6, 2018 · 0 comments
Closed

"acme.sh --cron --no-color" - prints color #1912

jmedin1965 opened this issue Nov 6, 2018 · 0 comments

Comments

@jmedin1965
Copy link

Steps to reproduce;

"acme.sh --cron --no-color"
but output still prints color
checking the code, and I believe that the logic in both __green() and __red() is reversed.
4 ocurances of;
if [ "$__INTERACTIVE${ACME_NO_COLOR}" = "1" -o "${ACME_FORCE_COLOR}" = "1" ]; then
should be
if [ "$__INTERACTIVE${ACME_NO_COLOR}" != "1" -o "${ACME_FORCE_COLOR}" = "1" ]; then
as, the if statement is entered, if $__INTERACTIVE${ACME_NO_COLOR}" = "1". So, the if stamtement is entered if NO_COLOR = 1. When the if statement is entered, color is added. So, the if statement should be entered if NO_COLOR = 0

Debug log

"/root/.acme.sh"/acme.sh --cron --no-color > out.txt
vi out.txt
[Tuesday 6 November 14:59:22 AEDT 2018] ^[[1;31;32m===Starting cron===^[[0m
[Tuesday 6 November 14:59:22 AEDT 2018] Installing from online archive.
[Tuesday 6 November 14:59:22 AEDT 2018] Downloading https://github.com/Neilpang/acme.sh/archive/master.tar.gz
[Tuesday 6 November 14:59:26 AEDT 2018] Extracting master.tar.gz
[Tuesday 6 November 14:59:26 AEDT 2018] Installing to /root/.acme.sh
[Tuesday 6 November 14:59:26 AEDT 2018] Installed to /root/.acme.sh/acme.sh
[Tuesday 6 November 14:59:26 AEDT 2018] Good, bash is found, so change the shebang to use bash as preferred.
[Tuesday 6 November 14:59:26 AEDT 2018] OK
[Tuesday 6 November 14:59:26 AEDT 2018] Install success!
[Tuesday 6 November 14:59:26 AEDT 2018] Upgrade success!
[Tuesday 6 November 14:59:26 AEDT 2018] Auto upgraded to: 2.8.0
[Tuesday 6 November 14:59:26 AEDT 2018] ^[[1;31;32mRenew: 'xxxxxxxxx.com'^[[0m
[Tuesday 6 November 14:59:26 AEDT 2018] Skip, Next renewal time is: ^[[1;31;32mSaturday 15 December 06:24:18 UTC 2018^[[0m
[Tuesday 6 November 14:59:26 AEDT 2018] Add '^[[1;31;40m--force^[[0m' to force to renew.
[Tuesday 6 November 14:59:26 AEDT 2018] Skipped xxxxxxxxxxx.com
[Tuesday 6 November 14:59:26 AEDT 2018] ^[[1;31;32m===End cron===^[[0m

acme.sh  --issue .....   --debug 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant