Skip to content

Commit

Permalink
Added exception for helm-path
Browse files Browse the repository at this point in the history
  • Loading branch information
Anumita committed Oct 15, 2019
1 parent 0c30698 commit 785a9d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,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()) {
Expand Down Expand Up @@ -89,7 +88,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');
Expand Down

0 comments on commit 785a9d3

Please sign in to comment.