Skip to content

Commit 84c44a9

Browse files
committed
fix: 🐛 fix getting pathes in bins
1 parent a2a4f05 commit 84c44a9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

bin/yas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from 'path';
55
import { run } from '../src/index.js';
66

77
const [, , ...args] = process.argv;
8-
const filePath = `${process.cwd()}${path.sep}${args}`;
8+
const filePath = args[0];
99

1010
fs.readFile(filePath, { encoding: 'utf-8' }, (err, data) => {
1111
if (err) {

bin/yasc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import path from 'path';
55
import { compile } from '../src/index.js';
66

77
const [, , ...args] = process.argv;
8-
const inputPath = `${process.cwd()}${path.sep}${args[0]}`;
9-
const outputPath = `${process.cwd()}${path.sep}${args[1]}`;
8+
const inputPath = args[0];
9+
const outputPath = args[1];
1010

1111
fs.readFile(inputPath, { encoding: 'utf-8' }, (err, data) => {
1212
if (err) {

bin/yasjs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from 'path';
55
import { compile, runJS } from '../src/index.js';
66

77
const [, , ...args] = process.argv;
8-
const filePath = `${process.cwd()}${path.sep}${args}`;
8+
const filePath = args[0];
99

1010
fs.readFile(filePath, { encoding: 'utf-8' }, (err, data) => {
1111
if (err) {

0 commit comments

Comments
 (0)