summaryrefslogtreecommitdiff
path: root/lib/gui/electron.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2019-04-12 16:48:25 -0400
committerLex Neva <github.com@lexneva.name>2019-04-12 16:48:25 -0400
commit5b5cde330fd21289fcdce7f43d37c54b7cc73310 (patch)
treebdf167a46d3d507484104da91203dae24474b841 /lib/gui/electron.py
parentfbbbf83fb546060c861185ff00deda884c03d595 (diff)
fix dev path
Diffstat (limited to 'lib/gui/electron.py')
-rw-r--r--lib/gui/electron.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gui/electron.py b/lib/gui/electron.py
index 4ecc37bf..ced3ad66 100644
--- a/lib/gui/electron.py
+++ b/lib/gui/electron.py
@@ -17,9 +17,10 @@ def open_url(url):
else:
# It's a bit trickier to find the electron app in a development environment.
base_dir = get_bundled_dir("electron")
- package_dir = glob(os.path.join(base_dir, 'dist', '*-unpacked'))
- if not package_dir:
+ try:
+ package_dir = glob(os.path.join(base_dir, 'dist', '*-unpacked'))[0]
+ except IndexError:
raise Exception("Electron app not found. Be sure to run 'yarn; yarn dist' in %s." % base_dir)
electron_path = os.path.join(base_dir, package_dir, "inkstitch-gui")