mirror of
https://github.com/frej/fast-export.git
synced 2026-01-23 22:59:02 +01:00
Check for a supported Python version on startup
Check that hg-fast-export is running on a supported version of Python on startup. This is an attempt to avoid problems like #314 in the future.
This commit is contained in:
@@ -45,6 +45,14 @@ if [ -z "${PYTHON}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"${PYTHON}" -c 'import sys; exit(sys.version_info.major==3 and sys.version_info.minor >= 7)'
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Could not find an interpreter for a supported Python version (>= 3.7)" \
|
||||
"Please use the 'PYTHON' environment variable to specify the interpreter to use."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
USAGE="[--quiet] [-r <repo>] [--force] [--ignore-unnamed-heads] [-m <max>] [-s] [--hgtags] [-A <file>] [-B <file>] [-T <file>] [-M <name>] [-o <name>] [--hg-hash] [-e <encoding>]"
|
||||
LONG_USAGE="Import hg repository <repo> up to either tip or <max>
|
||||
If <repo> is omitted, use last hg repository as obtained from state file,
|
||||
|
||||
Reference in New Issue
Block a user