Skip to content

Commit

Permalink
remove no-longer-needed AIX variant check
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Gorzinski committed Mar 6, 2019
1 parent 5df85a7 commit f6c0919
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions ibmi.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ const execa = require("execa");
const db2util = "/QOpenSys/pkgs/bin/db2util";
const sql = "select NEXT_HOP, LOCAL_BINDING_INTERFACE from QSYS2.NETSTAT_ROUTE_INFO where ROUTE_TYPE='DFTROUTE' and NEXT_HOP!='*DIRECT' and CONNECTION_TYPE=?";

const checkVariant = () => {
const variant = require("os").type();
if (variant !== "OS400") {
throw new Error(`Unsupported AIX variant: ${variant}`);
}
};

const parse = stdout => {
let result;
try {
Expand All @@ -27,12 +20,10 @@ const parse = stdout => {
};

const promise = family => {
checkVariant();
return execa.stdout(db2util, [sql, "-p", family, "-o", "json"]).then(stdout => parse(stdout));
};

const sync = family => {
checkVariant();
const {stdout} = execa.sync(db2util, [sql, "-p", family, "-o", "json"]);
return parse(stdout);
};
Expand Down

0 comments on commit f6c0919

Please sign in to comment.