fix version issue causing a contract to be undefined due to a pipeline error

This commit is contained in:
Iuri Matias 2018-03-22 15:36:20 -04:00
parent 9582efbe65
commit df765ed056
3 changed files with 5 additions and 5 deletions

View File

@ -49,7 +49,7 @@ class Npm {
let tarball = registryJSON.dist.tarball;
let packageDirectory = './.embark/versions/' + packageName + '/' + version + '/';
if (fs.existsSync(packageDirectory + "/downloaded_package.tgz")) {
if (fs.existsSync(packageDirectory + "/downloaded_package.tgz") && fs.existsSync(packageDirectory + "package.json")) {
if (returnContent) {
let distFile = packageDirectory + returnContent;
callback(null, fs.readFileSync(distFile).toString());
@ -79,7 +79,7 @@ class Npm {
let npmRegistry = "https://registry.npmjs.org/" + packageName + "/" + version;
let packageDirectory = './.embark/versions/' + packageName + '/' + version + '/';
if (fs.existsSync(packageDirectory)) {
if (fs.existsSync(packageDirectory) && fs.existsSync(packageDirectory + "package.json")) {
let content;
if (getFromGit && returnContent) {
let distFile = packageDirectory + packageName + ".js";

View File

@ -2,7 +2,7 @@
import React, { Component } from 'react';
import EmbarkJS from 'Embark/EmbarkJS';
//import SimpleStorage from 'Embark/contracts/SimpleStorage';
import SimpleStorage from 'Embark/contracts/SimpleStorage';
import Test from 'Embark/contracts/Test';
import Assert from 'Embark/contracts/Assert';
@ -21,7 +21,7 @@ import 'bootstrap/dist/js/bootstrap.min.js';
import { Navbar, Jumbotron, Button } from 'react-bootstrap';
window.EmbarkJS = EmbarkJS;
//window.SimpleStorage = SimpleStorage;
window.SimpleStorage = SimpleStorage;
window.Test = Test;
window.Assert = Assert;

View File

@ -2,7 +2,7 @@
"default": {
"versions": {
"web3.js": "1.0.0-beta.27",
"solc": "0.4.17"
"solc": "0.4.18"
},
"deployment": {
"host": "localhost",