windows craziness
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
323271067f
commit
7fd385d2d0
|
|
@ -31,19 +31,20 @@ const args = require("yargs")
|
|||
}${stripWindowsDriveLetter(path)}`;
|
||||
}
|
||||
|
||||
try {
|
||||
options = JSON.parse(fs.readFileSync(path, "utf-8"));
|
||||
driverConfigFile = fs.realpathSync(path);
|
||||
return true;
|
||||
} catch (e) {}
|
||||
|
||||
try {
|
||||
options = yaml.load(fs.readFileSync(path, "utf8"));
|
||||
driverConfigFile = fs.realpathSync(path);
|
||||
return true;
|
||||
} catch (e) {}
|
||||
try {
|
||||
driverConfigFile = fs.realpathSync(path);
|
||||
} catch (e) {
|
||||
console.log("failed finding config file realpath: " + e.toString());
|
||||
driverConfigFile = path;
|
||||
}
|
||||
|
||||
throw new Error("failed parsing config file: " + path);
|
||||
return true;
|
||||
} catch (e) {
|
||||
console.log("failed parsing config file: " + path);
|
||||
throw e;
|
||||
}
|
||||
},
|
||||
})
|
||||
.demandOption(["driver-config-file"], "driver-config-file is required")
|
||||
|
|
|
|||
Loading…
Reference in New Issue