Patching sys.argv[0] = __file__
where __file__
is the file where Task.init
happens helps with git repo discovery.
TightElk12 how is the launcher defined, exactly?
It's code is like that
` (env-name) /code# cat /opt/conda/envs/env-name/bin/doit `` #!/opt/conda/envs/env-name/bin/python
-- coding: utf-8 --
import re
import sys
from doit.main import main
if name == 'main':
sys.argv[0] = re.sub(r'(-script.pyw?|.exe)?$', '', sys.argv[0])
sys.exit(main()) `
If using the launcher as is -> Can not detect the repository:launcher args
but if execute the launcher as a module -> repository is detectedpython -m launcher args
It would be nice to avoid writing "python -m" everytime...