From 574b13cf2de0448eec76c1359313a5e29b22c6f1 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 1 Jul 2022 10:38:08 +0200 Subject: [PATCH] hack around python vs python3 binary names this is a hack! please remove once we don't need any python2 support anymore and replace with a python3 shebang --- inventories/vagrant.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inventories/vagrant.py b/inventories/vagrant.py index 1162e2277..fd7985512 100755 --- a/inventories/vagrant.py +++ b/inventories/vagrant.py @@ -1,4 +1,7 @@ -#!/usr/bin/env python +#!/usr/bin/env bash +# this is a very crude hack and can be removed once we have no more python2 systems +# that need to run this code +"exec" "$(command -v python3 || command -v python)" "$0" "$@" # Adapted from Mark Mandel's implementation # https://github.com/ansible/ansible/blob/devel/plugins/inventory/vagrant.py import argparse