We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66eb153 commit 3da4ec2Copy full SHA for 3da4ec2
Linux/.bashrc
@@ -49,7 +49,13 @@ if ! command -v curl &>/dev/null; then
49
else
50
export HAS_CURL="1"
51
fi
52
-##Is on WSL
+##Is on Colab?
53
+IS_ON_COLAB="0"
54
+command -v colab_diagnose_me &>/dev/null && IS_ON_COLAB="1"
55
+command -v colab-fileshim.py &>/dev/null && IS_ON_COLAB="1"
56
+[[ -S "/tmp/colab_runtime.sock" ]] && IS_ON_COLAB="1"
57
+export IS_ON_COLAB
58
+##Is on WSL?
59
IS_ON_WSL="0"
60
[[ -n "${WSLENV+x}" ]] && IS_ON_WSL="1"
61
[[ -s "/etc/wsl.conf" ]] && IS_ON_WSL="1"
0 commit comments