Skip to content

Commit 014ac6c

Browse files
author
Ben Wildeman
committed
Check to see if workspaceFile exists before finding the dir
1 parent 3b86401 commit 014ac6c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Tabulous Change Log
22

3+
## 1.0.2
4+
* Fixed bug where it's not possible to create terminal without workspace, for real this time
5+
36
## 1.0.1
47
* Fixed bug where it's not possible to create terminal without workspace
58

src/statusBarTerminal.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ export class StatusBarTerminal {
6161

6262
private resolveDir(path?: string) {
6363
const { workspaceFile, workspaceFolders } = workspace;
64-
const workspaceFileDir = dirname(workspaceFile.fsPath);
64+
// There'll definitely be a workspace file if there's more than one workspace folder
65+
const workspaceFileDir = workspaceFile && dirname(workspaceFile.fsPath);
6566

6667
if (path) {
6768
let cwd: string;

0 commit comments

Comments
 (0)