Created
May 13, 2020 14:56
-
-
Save gregtatum/ba74d8cb822d3b6a25c78e0ebdd0b5b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mach b/mach | |
--- a/mach | |
+++ b/mach | |
@@ -83,19 +83,19 @@ py2commands=" | |
run_py() { | |
# Try to run a specific Python interpreter. Fall back to the system | |
# default Python if the specific interpreter couldn't be found. | |
py_executable="$1" | |
shift | |
if which "$py_executable" > /dev/null | |
then | |
- exec "$py_executable" "$0" "$@" | |
+ exec "$py_executable" -m cProfile -s cumulative "$0" "$@" | |
elif [ "$py_executable" = "python2.7" ]; then | |
- exec python "$0" "$@" | |
+ exec python -m cProfile -s cumulative "$0" "$@" | |
else | |
echo "This mach command requires $py_executable, which wasn't found on the system!" | |
exit 1 | |
fi | |
} | |
first_arg=$1 | |
if [ "$first_arg" = "help" ]; then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment