Skip to content

Commit

Permalink
Fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
kiliczsh committed May 1, 2021
1 parent dc63f2d commit 0d94296
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
16 changes: 10 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6053,6 +6053,10 @@ try {
console.log(`Keyword: ${keyword}!`);
console.log(`Codebase Path: ${codebasepath}!`);


let currentPath = process.cwd();
console.log(currentPath);

function getFiles (dir, files_){
files_ = files_ || [];
let files = fs.readdirSync(dir);
Expand All @@ -6069,19 +6073,19 @@ try {

let filePaths = getFiles(codebasepath);
console.log(filePaths)

for(let p in filePaths){
console.log("Searching "+ p);
fs.readFile(p, function (err, data) {
console.log(typeof(filePaths))
console.log("Starting...");
for(let path in filePaths){
console.log("Searching "+ path);
fs.readFile(path, function (err, data) {
if (err) throw err;
if(data.includes(keyword)){
console.log(data);
}
});
}

let currentPath = process.cwd();
console.log(currentPath);

core.setOutput("result", "<none>");


Expand Down
16 changes: 10 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ try {
console.log(`Keyword: ${keyword}!`);
console.log(`Codebase Path: ${codebasepath}!`);


let currentPath = process.cwd();
console.log(currentPath);

function getFiles (dir, files_){
files_ = files_ || [];
let files = fs.readdirSync(dir);
Expand All @@ -25,19 +29,19 @@ try {

let filePaths = getFiles(codebasepath);
console.log(filePaths)

for(let p in filePaths){
console.log("Searching "+ p);
fs.readFile(p, function (err, data) {
console.log(typeof(filePaths))
console.log("Starting...");
for(let path in filePaths){
console.log("Searching "+ path);
fs.readFile(path, function (err, data) {
if (err) throw err;
if(data.includes(keyword)){
console.log(data);
}
});
}

let currentPath = process.cwd();
console.log(currentPath);

core.setOutput("result", "<none>");


Expand Down

0 comments on commit 0d94296

Please sign in to comment.