From 2ae9e7e0e7781cbdb33c42f058b0ba9c2cc1484f Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Fri, 25 May 2018 14:44:07 -0500 Subject: [PATCH] add a warning for vyper installation Signed-off-by: VoR0220 --- lib/i18n/locales/en.json | 8 +++++++- lib/modules/vyper/index.js | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/i18n/locales/en.json b/lib/i18n/locales/en.json index f23f3a21..58593c9f 100644 --- a/lib/i18n/locales/en.json +++ b/lib/i18n/locales/en.json @@ -127,5 +127,11 @@ "Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}:{{port}}.": "Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}:{{port}}.", "Error while downloading the file": "Error while downloading the file", "Error while loading the content of ": "Error while loading the content of ", - "no contracts found": "no contracts found" + "no contracts found": "no contracts found", + "Installing packages...": "Installing packages...", + "Next steps:": "Next steps:", + "open another console in the same directory and run": "open another console in the same directory and run", + "For more info go to http://embark.status.im": "For more info go to http://embark.status.im", + "%s is not installed on your machine": "%s is not installed on your machine", + "You can install it by visiting: %s": "You can install it by visiting: %s" } \ No newline at end of file diff --git a/lib/modules/vyper/index.js b/lib/modules/vyper/index.js index c8051531..1d2da9b8 100644 --- a/lib/modules/vyper/index.js +++ b/lib/modules/vyper/index.js @@ -36,6 +36,14 @@ class Vyper { return cb(); } self.logger.info(__("compiling Vyper contracts") + "..."); + + const vyper = shelljs.which('vyper'); + if (!vyper) { + self.logger.warn(__('%s is not installed on your machine', 'Vyper')); + self.logger.info(__('You can install it by visiting: %s', 'https://vyper.readthedocs.io/en/latest/installing-vyper.html')); + return cb(); + } + const compiled_object = {}; async.each(contractFiles, function (file, fileCb) {