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

printf: Illegal option #18

Closed
nicwaller opened this issue Jun 15, 2022 · 3 comments
Closed

printf: Illegal option #18

nicwaller opened this issue Jun 15, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@nicwaller
Copy link

I'm trying astro for the first time, and when I load a page I get these error messages at the bottom:

Keys: qgrbosHmM, to see a description run astro -h./astro: 254: printf: Illegal option -
./astro: 254: printf: Illegal option -
./astro: 254: printf: Illegal option -
Screenshot image

Steps to Reproduce

  1. Using Ubuntu 22.04
  2. Log into /bin/bash shell
  3. git clone https://github.com/blmayer/astro.git
  4. git checkout f97bc206a69bd961ccbce814813d5ec98f1714a7
  5. ./astro gemini://derelict.garden/astro.gmi

What I attempted

I tried patching astro like this 👇 and the error went away.

diff --git a/astro b/astro
index 465bd79..9b454c4 100755
--- a/astro
+++ b/astro
@@ -251,7 +251,7 @@ EOF
                                        do
                                                printf "%*s" "$margin" ""
                                                # shellcheck disable=SC2059
-                                               printf "$sty$txt\\n"
+                                               printf "$sty $txt\\n"
                                        done
                                }
                        fi

However, that introduces an extra space on every line which may be unwanted.

@blmayer
Copy link
Owner

blmayer commented Jun 15, 2022

Hi Nic, thanks for opening this issue, I'll take a look into this issue briefly. I the meantime, please consider answering the following questions:

  • Does this error happen to all websites or just this one?
  • Do you have a custom configuration file?

And thanks for proposing a possible solution. If you figure it out feel free to open a pull request.

@blmayer blmayer self-assigned this Jun 15, 2022
@blmayer blmayer added the bug Something isn't working label Jun 15, 2022
@nicwaller
Copy link
Author

Oh hey, I just noticed that you fixed this bug. Thank you! I tried the new version and I no longer experience this bug. It makes the experience of using astro much better. 😃

@blmayer
Copy link
Owner

blmayer commented Jun 27, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants