Skip to content

Commit

Permalink
added
Browse files Browse the repository at this point in the history
  • Loading branch information
MLainer1 committed Sep 22, 2024
1 parent 1e78990 commit ec687a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export function activate(context: vscode.ExtensionContext): void {
Logger.createLogger()
const contentPath = tools.getContentPath()
if (!contentPath) {
vscode.window.showErrorMessage('Could not find content path, run the command from a content directory.');
// dont activate outside of content path
return
}
Expand Down Expand Up @@ -70,6 +71,7 @@ export function activate(context: vscode.ExtensionContext): void {

context.subscriptions.push(
vscode.commands.registerCommand('xsoar.run', (file: vscode.Uri | undefined) => {

const fileToRun = getDirPath(file)
runAndDebug.run(fileToRun)
})
Expand Down
2 changes: 1 addition & 1 deletion src/terminalManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Logger } from "./logger";
export function isRunningInsideContent(): boolean {
const contentPath = tools.getContentPath()
if (!contentPath) {
vscode.window.showErrorMessage('Could not find content path, please run the command from a content directory.');
vscode.window.showErrorMessage('Could not find content path, run the command from a content directory.');
return false;
}
return true;
Expand Down

0 comments on commit ec687a2

Please sign in to comment.