Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
MLainer1 committed Sep 23, 2024
1 parent e71926f commit 27296c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Commands:
* You can also run the commands directry from the explorer menu:
![sidebar](documentation/changelog/0.0.3/sidebar.png)

NOTE: You have to run the commands from a content-like repository, i.e. */content/packs/* .
NOTE: To use the extension, make sure there's a `Packs` folder at the repository root.

## Configurations

Expand Down
16 changes: 0 additions & 16 deletions src/terminalManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ import { Logger } from "./logger";
* Used to manage backgrount terminal. Will auto-kill any terminal that is older than
* 60 seconds.
*/

export function isRunningInsideContent(): boolean {
const contentPath = tools.getContentPath()
if (!contentPath) {
vscode.window.showErrorMessage('Could not find content path, run the command from a content directory.');
return false;
}
return true;
}

export class TerminalManager {
static terminal: vscode.Terminal;
private static delay(ms: number) {
Expand All @@ -32,8 +22,6 @@ export class TerminalManager {
// options: vscode.TerminalOptions,
options: ProcessEnvOptions
): Promise<void> {
if (!isRunningInsideContent())
return;
const sdkPath = tools.getSDKPath()
for (let i = 0; i < command.length; i++) {
if (command[i].includes(' ')) {
Expand All @@ -56,8 +44,6 @@ export class TerminalManager {

public static async sendDemistoSdkCommandWithProgress(command: string[]): Promise<boolean> {
const sdkPath = tools.getSDKPath()
if (!isRunningInsideContent())
return false;
// loop the command and add quotes to each argument
for (let i = 0; i < command.length; i++) {
if (command[i].includes(' ')) {
Expand Down Expand Up @@ -129,8 +115,6 @@ export class TerminalManager {
newTerminal = false,
timeout = 10000
): Promise<void> {
if (!isRunningInsideContent())
return;
for (let i = 0; i < command.length; i++) {
if (command[i].includes(' ')) {
command[i] = `"${command[i]}"`
Expand Down

0 comments on commit 27296c7

Please sign in to comment.