git ssh.
This commit is contained in:
parent
2e4c9bbc4f
commit
911d844402
12
dotfiles/lib/git-ssh.sh
Executable file
12
dotfiles/lib/git-ssh.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If parent command is "npm ...", then redirect stderr to /dev/null
|
||||
# https://github.com/npm/npm/issues/7979#issuecomment-94953923
|
||||
|
||||
GRANDPARENT_PID=$(ps -p $PPID -o ppid=)
|
||||
|
||||
if ps -p $GRANDPARENT_PID -o command= | grep -q -P "^npm"; then
|
||||
ssh "$@" 2>/dev/null
|
||||
else
|
||||
ssh "$@"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user