Skip to content

Commit 556ca53

Browse files
authored
Merge pull request #14 from aboucaud/better-grep
Simplify jupyter version parser
2 parents a89d6fc + 112c422 commit 556ca53

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

stackyter.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,7 @@ def get_config(config, configfile):
180180
{run_before}
181181
{user_setup}
182182
{run_after}
183-
case "{args.jupyter}" in
184-
lab)
185-
jupyter_version=$(jupyter --version | grep 'jupyter lab' | awk '{{print $4}}' | awk -F '.' '{{print $1}}');;
186-
notebook)
187-
jupyter_version=$(jupyter --version | grep 'jupyter-notebook' | awk '{{print $3}}' | awk -F '.' '{{print $1}}');;
188-
esac
183+
jupyter_version=$(jupyter --version | grep '{args.jupyter}' | awk '{{print $NF}}' | awk -F '.' '{{print $1}}')
189184
function get_servers() {{
190185
local version=$1
191186
local flavor="{args.jupyter}"

0 commit comments

Comments
 (0)