Change qtcreator terminal used to run build time targets
-
First I'm running QtCreator 4.15.0 under Ubuntu 20.04.
I've got a project (in a .pro file) that generates a build time target from a shell script. I'm trying to pass some arguments to ls that used to work under Ubuntu 18.04, but are now generating an error:
ls: cannot access '../../QScribe-Alphas/QScribeGui/*.{cpp,h,qml}': No such file or directoryThe problem is that qtcreator is running the script in the 'sh' shell, I would like to change that to 'bash'.
I found a pointer to Options->Environment->System->Terminal:. I changed it to point to /bin/bash, but the script is still running under 'sh'.
How do I change the shell that is used to run build time targets?
Regards,
Greg -
In talking to Qt support , they told me that the reason that it is not possible to change the shell used at build time is that it is spawned by make not QtCreator. They suggested that I add a shebang (#!/bin/bash) to the top of the script and that worked.
The also suggested that it might be possible to force make to use bash, but couldn't provide a tested method.
I posted this to let others know what the outcome is.Greg
-
Hi,
I would go with "#!/usr/bin/env bash" so that the configured version of bash is used rather than forcing a specific version.