Skip to content

Commit 7eaf8ed

Browse files
committed
Don't simulate a TTY if clangd is invoked by IDE
Without this, vscode complains that clangd just crashes. Also make ~/bin/clangd executable
1 parent aec51a1 commit 7eaf8ed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build/gen_dev_docker.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,14 @@ then
6464
ccache_args=\$args
6565
fi
6666
67+
if [ -t 1 ] ; then
68+
TERMINAL_ARGS=-it `# Run in interactive mode and simulate a TTY`
69+
else
70+
TERMINAL_ARGS=-i `# Run in interactive mode`
71+
fi
6772
6873
sudo docker run --rm `# delete (temporary) image after return` \\
69-
-it `# Run in interactive mode and simulate a TTY` \\
74+
\${TERMINAL_ARGS} \\
7075
--privileged=true `# Run in privileged mode ` \\
7176
--cap-add=SYS_PTRACE \\
7277
--security-opt seccomp=unconfined \\
@@ -87,6 +92,7 @@ then
8792
echo -e "\tThis can cause problems with some scripts (like fdb-clangd)"
8893
fi
8994
chmod +x $HOME/bin/fdb-dev
95+
chmod +x $HOME/bin/clangd
9096
echo "To start the dev docker image run $HOME/bin/fdb-dev"
9197
echo "$HOME/bin/clangd can be used for IDE integration"
9298
echo "You can edit these files but be aware that this script will overwrite your changes if you rerun it"

0 commit comments

Comments
 (0)