mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Add a bunch of hacks to fix #518
This commit is contained in:
parent
a7dba87543
commit
0195911606
3 changed files with 5 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue