Skip to content

Commit

Permalink
Merge pull request #182 from /issues/179
Browse files Browse the repository at this point in the history
issues/179
  • Loading branch information
kirksl authored Nov 2, 2023
2 parents 29ac87f + e763026 commit 224dd5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 1 addition & 6 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,7 @@ async function runKarateTest(args = null)
let projectRootPath = projectDetail.projectRoot;
let runFilePath = projectDetail.runFile;

if (runFilePath === "")
{
return;
}

if (!runFilePath.toLowerCase().endsWith(standaloneBuildFile))
if (runFilePath !== "" && !runFilePath.toLowerCase().endsWith(standaloneBuildFile))
{
if (!runFilePath.toLowerCase().endsWith(javaScriptBuildFile))
{
Expand Down
7 changes: 7 additions & 0 deletions src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ async function isPortFree(port: number): Promise<boolean>

function getProjectDetail(uri: vscode.Uri, type: vscode.FileType): IProjectDetail
{
let defaultRootPath = vscode.workspace.workspaceFolders[0].uri.fsPath;
let filePathArray = uri.fsPath.split(path.sep);
let projectRootPath = "";
let runFilePath = "";
Expand Down Expand Up @@ -116,6 +117,12 @@ function getProjectDetail(uri: vscode.Uri, type: vscode.FileType): IProjectDetai
break;
}

if (defaultRootPath == runFileTestPath)
{
projectRootPath = defaultRootPath;
break;
}

filePathArray.pop();
}

Expand Down

0 comments on commit 224dd5b

Please sign in to comment.