diff --git a/CHANGELOG.md b/CHANGELOG.md index a7d768e..b7decc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +# [0.4.4] (2022-08-10) + +- Fixed an issue with opening a Dev Container in a development image. +- Fixed an issue with Git installation in Dev Container. +- If **demisto-sdk lint** fails when opening a Dev Container or Virtual Environment, show error message and not proceed. + # [0.4.3] (2022-08-05) - Fixed issues with M1 Macs. diff --git a/Templates/integration_env/.devcontainer/Dockerfile b/Templates/integration_env/.devcontainer/Dockerfile index f04509a..14b7352 100644 --- a/Templates/integration_env/.devcontainer/Dockerfile +++ b/Templates/integration_env/.devcontainer/Dockerfile @@ -7,9 +7,10 @@ ADD extra-requirements-py3.txt / RUN chmod +x /create_certs.sh \ && /create_certs.sh /usr/local/share/ca-certificates/certs.crt \ && update-ca-certificates \ + && apk update || apt-get update -y || echo "Could not update package mangaer" \ && apk add bash || echo "No alpine, no need to install bash" \ - && apk add git || apt-get install git || echo "Could not install git" \ - && apk add build-base || apt-get install build-essential || echo "Could not install build-essential" \ + && apk add git || apt-get install git -y || echo "Could not install git" \ + && apk add build-base || apt-get install build-essential -y || echo "Could not install build-essential" \ # check if pip command exists && if [ -x "$(command -v pip)" ]; then \ pip install autopep8; \ diff --git a/Templates/integration_env/.devcontainer/devcontainer.json b/Templates/integration_env/.devcontainer/devcontainer.json index 1582318..b66a261 100644 --- a/Templates/integration_env/.devcontainer/devcontainer.json +++ b/Templates/integration_env/.devcontainer/devcontainer.json @@ -3,8 +3,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - // if this value is not set, make sure `demisto-sdk lint` works - "IMAGENAME": "This should be the name of the test image" + "IMAGENAME": "" } }, "containerUser": "demisto", diff --git a/package-lock.json b/package-lock.json index c38d1c3..0b22efd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "xsoar", - "version": "0.4.3", + "version": "0.4.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "xsoar", - "version": "0.4.3", + "version": "0.4.4", "license": "SEE LICENSE IN LICENSE", "dependencies": { "envfile": "^6.17.0", diff --git a/package.json b/package.json index ddc4a97..7f3ed7f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "xsoar", "displayName": "Cortex XSOAR", "description": "Build, Format, and Validate Cortex XSOAR with ease.", - "version": "0.4.3", + "version": "0.4.4", "engines": { "vscode": "^1.54.0" }, diff --git a/src/demistoSDKWrapper.ts b/src/demistoSDKWrapper.ts index 6565017..f3a8994 100644 --- a/src/demistoSDKWrapper.ts +++ b/src/demistoSDKWrapper.ts @@ -63,7 +63,11 @@ export async function lint(file: string, tests = true, lints = true, progress = command.push('--no-flake8', '--no-mypy', '--no-bandit', '--no-xsoar-linter', '--no-vulture', '--no-pylint', '--no-pwsh-analyze') } if (progress) { - await TerminalManager.sendDemistoSdkCommandWithProgress(command) + const isSuccess = await TerminalManager.sendDemistoSdkCommandWithProgress(command) + if (!isSuccess){ + await tools.isDemistoSDKinstalled() + throw new Error('Demisto-SDK lint failed') + } } else { TerminalManager.sendDemistoSDKCommand(command); diff --git a/src/devEnvs.ts b/src/devEnvs.ts index 592f368..a906675 100644 --- a/src/devEnvs.ts +++ b/src/devEnvs.ts @@ -214,7 +214,8 @@ export async function openIntegrationDevContainer(dirPath: string): Promise