Add a bunch of hacks to fix #518

This commit is contained in:
Oliver Blanthorn 2018-05-11 21:33:10 +01:00
parent a7dba87543
commit 0195911606
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
3 changed files with 5 additions and 3 deletions

View file

@ -10,8 +10,9 @@ export async function source(filename = "auto") {
} else {
rctext = (await Native.read(filename)).content
}
if (rctext === undefined) return false
runRc(rctext)
return true
}
export async function runRc(rc: string) {

View file

@ -324,7 +324,7 @@ export async function installnative() {
//#background
export async function source(...fileArr: string[]) {
const file = fileArr.join(" ") || undefined
if (await Native.nativegate("0.1.3")) rc.source(file)
if (await Native.nativegate("0.1.3")) if (!await rc.source(file)) logger.error("Could not find RC file")
}
/**

View file

@ -58,7 +58,8 @@ export async function getrc(): Promise<string> {
logger.info(`Successfully retrieved fs config:\n${res.content}`)
return res.content
} else {
logger.error(`Error in retrieving config: ${res.error}`)
// Have to make this a warning as async exceptions apparently don't get caught
logger.info(`Error in retrieving config: ${res.error}`)
}
}