From 95f5ee4383aa646353fb5d9a6bec908c5a1cf74d 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 8a0005bad..84b98fd7c 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