From 1df7de082edcd87b46151695a1d129bb20f360a5 Mon Sep 17 00:00:00 2001 From: Florian Sihler Date: Fri, 27 Dec 2024 14:30:57 +0100 Subject: [PATCH] refactor: try to delay home path injection for ci --- src/flowr/internal-session.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flowr/internal-session.ts b/src/flowr/internal-session.ts index b5dd1a9..109d32e 100644 --- a/src/flowr/internal-session.ts +++ b/src/flowr/internal-session.ts @@ -60,12 +60,12 @@ export class FlowrInternalSession implements FlowrSession { this.outputChannel.appendLine(`Using options ${JSON.stringify(options)}`) this.shell = new RShell(options) - this.shell.tryToInjectHomeLibPath() // wait at most 1 second for the version, since the R shell doesn't let us know if the path // we provided doesn't actually lead anywhere, or doesn't contain an R executable, etc. let handle: NodeJS.Timeout - const timeout = new Promise(resolve => handle = setTimeout(() => resolve(null), 1000)) + const timeout = new Promise(resolve => handle = setTimeout(() => resolve(null), 1500)) + this.shell.tryToInjectHomeLibPath() await Promise.race([this.shell.usedRVersion(), timeout]).then(version => { clearTimeout(handle) if(!version){