Skip to content

Commit 368b7f3

Browse files
committed
resolve paths
1 parent 4649a2b commit 368b7f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

if-changed.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const child_process = require('child_process');
44
const path = require('path');
55

6-
const currentPath = path.relative(__dirname, process.cwd());
6+
const currentPath = path.resolve(path.relative(__dirname, process.cwd()));
77
console.log('path: ', currentPath);
88

99
const result = child_process
@@ -16,7 +16,7 @@ if (result) {
1616
const dirs = result
1717
.split('\n')
1818
.filter(file => file)
19-
.map(file => path.dirname(file));
19+
.map(file => path.resolve(path.dirname(file)));
2020

2121
for (const dir of dirs) {
2222
if (dir.startsWith(currentPath)) {

0 commit comments

Comments
 (0)