Skip to content

Commit

Permalink
Fix breakage when multiple default routes are declared (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyrichardson authored Jul 29, 2021
1 parent a299ef7 commit 20e5204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const sudo = require('./sudo');

async function getDefaultInterface() {
const result = await shell(
"sudo route | grep '^default' | grep -o '[^ ]*$' | tr -d '\n'",
"sudo route | grep -m 1 '^default' | grep -o '[^ ]*$' | tr -d '\n'",
{ shell: true }
);

Expand Down

0 comments on commit 20e5204

Please sign in to comment.