Skip to content

Commit

Permalink
fuckport: add desc
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Mar 6, 2024
1 parent 532f335 commit 690b461
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/fuckport.nix
Original file line number Diff line number Diff line change
@@ -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')
Expand Down

0 comments on commit 690b461

Please sign in to comment.