Skip to content

Commit

Permalink
Do not attempt to use python2
Browse files Browse the repository at this point in the history
  • Loading branch information
youtux committed Sep 16, 2024
1 parent 3253c25 commit 8e6cb76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
13 changes: 4 additions & 9 deletions python/bin/gherkin
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
#!/usr/bin/env sh
# Use "make GHERKIN_PYTHON_VERSION=python2 ..." to use python2
if [ -z "$GHERKIN_PYTHON_VERSION" ];
then
if [ -x "$(command -v python)" ]
then
GHERKIN_PYTHON_VERSION=python
elif [ -x "$(command -v python3)" ]
if [ -x "$(command -v python3)" ]
then
GHERKIN_PYTHON_VERSION=python3
elif [ -x "$(command -v python2)" ]
elif [ -x "$(command -v python)" ]
then
GHERKIN_PYTHON_VERSION=python2
else
echo "Neiter python, python3 or python2 found on PATH, exiting"
GHERKIN_PYTHON_VERSION=python
echo "Neither python3 or python found on PATH, exiting"
exit 1
fi
fi
Expand Down
13 changes: 4 additions & 9 deletions python/bin/gherkin-generate-tokens
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
#!/usr/bin/env sh
# Use "make GHERKIN_PYTHON_VERSION=python2 ..." to use python2
if [ -z "$GHERKIN_PYTHON_VERSION" ];
then
if [ -x "$(command -v python)" ]
then
GHERKIN_PYTHON_VERSION=python
elif [ -x "$(command -v python3)" ]
if [ -x "$(command -v python3)" ]
then
GHERKIN_PYTHON_VERSION=python3
elif [ -x "$(command -v python2)" ]
elif [ -x "$(command -v python)" ]
then
GHERKIN_PYTHON_VERSION=python2
else
echo "Neiter python, python3 or python2 found on PATH, exiting"
GHERKIN_PYTHON_VERSION=python
echo "Neither python3 or python found on PATH, exiting"
exit 1
fi
fi
Expand Down

0 comments on commit 8e6cb76

Please sign in to comment.