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

display error dialog prompting user to force upgrade buggy Python plugin #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion fontcExport.glyphsFileFormat/Contents/Resources/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,18 @@ def setUpFontc(self):
"-r",
os.path.join(self.pluginResourcesDirPath(), "requirements.txt"),
]
run_subprocess_in_macro_window(installCommand, check=True)
try:
run_subprocess_in_macro_window(installCommand, check=True)
except subprocess.CalledProcessError as e:
raise RuntimeError(
"\nThere is a known issue with the Glyphs Python plugin that "
"prevents `pip` from working correctly. This has been fixed in "
"the latest version of the Python plugin.\n"
"You can try to force the upgrade by going to: "
"Window -> Plugin Manager -> Modules, then click the red "
"'REMOVE' button next to the 'Python' plugin, then 'INSTALL' and "
"finally restart Glyphs app.\n"
) from e

assert os.path.exists(fontcPath), "fontc not found after installation"
return fontcPath
Expand Down