diff --git a/src/constants.ts b/src/constants.ts index 09008492c..14b020f7b 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -71,6 +71,10 @@ export const CONSTANTS = { "error.incorrectFileNameForDevicePopup", 'Seems like you have a different file name than what CPX requires, please rename it to "code.py" or "main.py".' ), + INSTALLATION_ERROR: localize( + "error.installationError", + "Installation Error" + ), INVALID_FILE_EXTENSION_DEBUG: localize( "error.invalidFileExtensionDebug", "The file you tried to run isn't a Python file." diff --git a/src/extension_utils/utils.ts b/src/extension_utils/utils.ts index ed6f83989..5a97f7ef2 100644 --- a/src/extension_utils/utils.ts +++ b/src/extension_utils/utils.ts @@ -22,6 +22,10 @@ import { DependencyChecker } from "./dependencyChecker"; const exec = util.promisify(cp.exec); +const errorChannel = vscode.window.createOutputChannel( + CONSTANTS.ERROR.INSTALLATION_ERROR +); + // tslint:disable-next-line: export-name export const getPathToScript = ( context: vscode.ExtensionContext, @@ -369,6 +373,7 @@ export const installPythonDependencies = async ( }); console.error(err); + this.logToOutputChannel(errorChannel, err.toString(), true /* show */); installed = false; } return installed;