logoalt Hacker News

figmertlast Friday at 4:47 AM1 replyview on HN

Create a wrapping binary instead

    mkdir -p ~/.local/bin
    printf '#!/usr/bin/env sh\nexec android-cli --no-metrics "$@"' > ~/.local/bin/android-cli
    echo 'PATH="$HOME/.local/bin:$PATH"' >> ~/.zshenv

Replies

yorwbalast Friday at 7:18 AM

I'm pretty sure this will just call itself in a loop. You need to use the absolute path to the wrapped binary to distinguish it from the wrapper.

show 3 replies