@@ -36,7 +36,7 @@ const runCommands = async (commands: string[], language: string) => {
3636}
3737
3838
39- const setupActions = async ( { commands, commits, files} : G . StepActions ) : Promise < void > => {
39+ const setupActions = async ( workspaceRoot : vscode . WorkspaceFolder , { commands, commits, files} : G . StepActions ) : Promise < void > => {
4040 // run commits
4141 for ( const commit of commits ) {
4242 await git . loadCommit ( commit )
@@ -49,18 +49,7 @@ const setupActions = async ({commands, commits, files}: G.StepActions): Promise<
4949 for ( const filePath of files ) {
5050 console . log ( `OPEN_FILE ${ filePath } ` )
5151 try {
52- // TODO: re-enable after testing
53- // const workspaceRoots: vscode.WorkspaceFolder[] | undefined = vscode.workspace.workspaceFolders
54- // if (!workspaceRoots || !workspaceRoots.length) {
55- // throw new Error('No workspace root path')
56- // }
57- // const rootWorkspace: vscode.WorkspaceFolder = workspaceRoots[0]
58- // const absoluteFilePath = join(rootWorkspace.uri.path, relativeFilePath)
59- const workspaceRoot = vscode . workspace . rootPath
60- if ( ! workspaceRoot ) {
61- throw new Error ( 'No workspace root path' )
62- }
63- const absoluteFilePath = join ( workspaceRoot , filePath )
52+ const absoluteFilePath = join ( workspaceRoot . uri . path , filePath )
6453 const doc = await vscode . workspace . openTextDocument ( absoluteFilePath )
6554 await vscode . window . showTextDocument ( doc , vscode . ViewColumn . One )
6655 // there are times when initialization leave the panel behind any files opened
0 commit comments