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

Cannot stat ./.work/octicons-regular-relocated.ttf #34

Open
jep-dev opened this issue Feb 2, 2017 · 1 comment
Open

Cannot stat ./.work/octicons-regular-relocated.ttf #34

jep-dev opened this issue Feb 2, 2017 · 1 comment

Comments

@jep-dev
Copy link

jep-dev commented Feb 2, 2017

fu-relocate is redirected 2>/dev/null so any failure is displaced to the next dependent line, in this case build.sh:13 (fu-relocate ...) to build.sh:14 (cp ...).

Appending || { echo "Failed for ..." && exit 1 } to each command shows me that the first invocation of fu-relocate failed... and removing the redirection to /dev/null shows that I was missing FontForge.

Possible fixes:

which fontforge >/dev/null || echo "Missing FontForge" && exit 1 (most portable?)

[ -x /usr/bin/fontforge ] || echo "Missing FontForge" && exit 1 (depends on location)

dpkg -l | grep fontforge || echo "Missing FontForge" && exit 1 (depends on dpkg)

@jep-dev
Copy link
Author

jep-dev commented Feb 2, 2017

As a general rule, when one command requires the success of another, I chain them with '&&'. There's a time and a place for redirection to /dev/null, like my use of which, but silencing errors on critical sections and carrying on seems like a mistake. If the user wants to silence it, they can either set up the redirect at the top-level invocation of build.sh, or you can give them a --silent/--quiet option to do it for them.

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