mirror of
https://github.com/democratic-csi/democratic-csi.git
synced 2026-10-09 18:05:36 +02:00
windows craziness
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
+11
-10
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user