Skip to content

Commit

Permalink
Pass in right dir when calling runme CLI (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann authored Oct 31, 2022
1 parent 8f4d09a commit 880b798
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extension/extension.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import path from 'node:path'

import vscode from 'vscode'

import { Serializer } from './notebook'
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 880b798

Please sign in to comment.