Added exception for helm-path

This commit is contained in:
Anumita Shenoy
2019-10-15 13:33:32 +05:30
parent d96a92f866
commit 8c3e46019c
2 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ function getStableHelmVersion() {
});
}
var walkSync = function (dir, filelist, fileToFind) {
var fs = fs || require('fs'), files = fs.readdirSync(dir);
var files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function (file) {
if (fs.statSync(path.join(dir, file)).isDirectory()) {
@ -95,6 +95,7 @@ function downloadHelm(version) {
}
const helmpath = findHelm(cachedToolpath);
if (!helmpath) {
throw new Error(util.format("Helm executable not found in path ", cachedToolpath));
}
fs.chmodSync(helmpath, '777');
return helmpath;

View File

@ -52,8 +52,7 @@ async function getStableHelmVersion(): Promise<string> {
var walkSync = function(dir, filelist, fileToFind) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
var files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(path.join(dir, file)).isDirectory()) {
@ -88,7 +87,7 @@ async function downloadHelm(version: string): Promise<string> {
const helmpath = findHelm(cachedToolpath);
if (!helmpath) {
throw new Error(util.format("Helm executable not found in path ", cachedToolpath));
}
fs.chmodSync(helmpath, '777');