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 a4466b7 commit 8129dc2Copy full SHA for 8129dc2
scripts/run_vim.sh
@@ -23,6 +23,15 @@ while [ $# -gt 0 ]; do
23
shift
24
done
25
26
-# Run as the vimtest user. This is not really for security. It is for running
27
-# Vim as a user that's unable to write to your volume.
28
-exec su -l vimtest -c "cd /testplugin && /vim-build/bin/$BIN $ARGS"
+# Run as the vimtest user (when no USER is specified in the Dockerfile, i.e.
+# when running as root).
+# This is not really for security. It is for running Vim as a user that's
29
+# unable to write to your volume.
30
+if [ "$(id -u)" = 0 ]; then
31
+ exec su -l vimtest -c "cd /testplugin && /vim-build/bin/$BIN $ARGS"
32
+fi
33
+
34
+cd /testplugin || exit
35
36
+# shellcheck disable=SC2086
37
+exec "/vim-build/bin/$BIN" $ARGS
0 commit comments