Commit a52478ec authored by Jeongmin Byun's avatar Jeongmin Byun

remove gutil using code

parent 0d846fbd
{
"name": "gitlab-artifact-dep",
"version": "0.2.0",
"version": "0.2.1",
"description": "Manages node.js package dependency towards Gitlab artifacts.",
"main": "src/index.js",
"repository": "ssh://git@git.elicer.io:2201/elice/gitlab-artifact-dep.git",
......
......@@ -66,7 +66,7 @@ function download(url, token, dest, attemptCount) {
if (count < MAX_DOWNLOAD_COUNT) {
const message = (`Requested GitLab artifact does not exist. `
+ `Installer will try to download again in ${DOWNLOAD_SLEEP_DURATION / 1000} seconds.`);
gutil.log(message);
log(message);
setTimeout(() => {
download(url, token, dest, count + 1).then(val => {
......@@ -195,7 +195,7 @@ function yarn(arg, cwd, cb) {
}
script.on('exit', function (code) {
if (code !== 0) {
throw new gutil.PluginError('gitlab', `Failed on running Yarn with "${arg}" at "${cwd}".`);
throw `Failed on running Yarn with "${arg}" at "${cwd}".`;
}
cb(code);
});
......@@ -205,7 +205,7 @@ function removePeerDependencies(project) {
return new Promise((resolve, reject) => {
const packageInfo = JSON.parse(fs.readFileSync(`${project.path}/package.json`, 'utf8', function (err) {
if (err) {
console.log(`No package.json found in "${project.path}".`);
log(`No package.json found in "${project.path}".`);
}
}));
if (packageInfo) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment