From 880b798d3e75fb5b8afaeba9cf55068b5b59d01a Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Mon, 31 Oct 2022 14:29:17 -0700 Subject: [PATCH] Pass in right dir when calling runme CLI (#41) --- src/extension/extension.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/extension/extension.ts b/src/extension/extension.ts index 582c4672a..82f018972 100644 --- a/src/extension/extension.ts +++ b/src/extension/extension.ts @@ -1,3 +1,5 @@ +import path from 'node:path' + import vscode from 'vscode' import { Serializer } from './notebook' @@ -55,7 +57,7 @@ export async function activate (context: vscode.ExtensionContext) { const cliName: string = (cell.metadata?.['cliName'] || '').trim() const term = vscode.window.createTerminal(`CLI: ${cliName}`) term.show(false) - term.sendText(`runme run ${cliName}`) + term.sendText(`runme run ${cliName} --chdir="${path.dirname(cell.document.uri.fsPath)}"`) }), vscode.commands.registerCommand('runme.resetEnv', resetEnv)