Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hocgin committed Aug 23, 2024
1 parent 7751b21 commit 2d65f72
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,26 @@ export async function run(input: Inputs): Promise<Outputs> {
let baseDir = __dirname;
const absPath = file;
if (!fs.existsSync(absPath)) {

let cwd = process.cwd();
warning(`not found file.
cwd = ${process.cwd()},
cwd = ${cwd},
__dirname = ${__dirname}
file = ${file}
./file = ${path.relative('.', file)}
file = ${file},
./file = ${path.relative('.', file)},
`)
info(`file files = ${fs.readdirSync(file)}`);
info(`baseDir files = ${fs.readdirSync(baseDir)}`);
info(`relative files = ${fs.readdirSync(path.relative(__dirname, file))}`);
if (fs.existsSync(cwd)) {
info(`cwd files = ${fs.readdirSync(cwd)}`);
}

if (fs.existsSync(__dirname)) {
info(`__dirname files = ${fs.readdirSync(__dirname)}`);
}

let path1 = path.relative(__dirname, file);
if (fs.existsSync(path1)) {
info(`relative files = ${fs.readdirSync(path1)}`);
}
} else {
fileContent = fs.readFileSync(absPath).toString();
}
Expand Down

0 comments on commit 2d65f72

Please sign in to comment.