fuckport: add desc

This commit is contained in:
Sridhar Ratnakumar 2024-03-06 08:54:12 -05:00
parent 532f335b3c
commit 690b461868

View file

@ -1,11 +1,14 @@
{ writeShellApplication, jc, jq, ... }:
# Kill the process with the port open
# Used only to kill stale ghc.
# FIXME: This doesn't work when lsof returns *multiple* processes.
writeShellApplication {
name = "fuckport";
runtimeInputs = [ jc jq ];
meta.description = ''
Kill the process with the port open
Used only to kill stale ghc.
'';
# FIXME: This doesn't work when lsof returns *multiple* processes.
text = ''
lsof -i :"$1"
THEPID=$(lsof -i :"$1" | jc --lsof 2> /dev/null | jq '.[].pid')