Skip to content

Commit 7335d34

Browse files
committed
feat: change the disk path when repo and program are on different disks
1 parent 8b83fd6 commit 7335d34

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ function start() {
5555
'git pull',
5656
`git log --pretty=format:"%an|||%ae|||%s|||'%h|||%ad"`,
5757
]
58+
59+
// Change the disk path when repo and program are on different disks
60+
const curDiskSymbol = process.argv0.split(':')[0]
61+
if (!String(repo).startsWith(curDiskSymbol)) {
62+
const diskSymbol = String(repo).split(':')[0]
63+
cmds.unshift(`${diskSymbol}:`)
64+
}
65+
66+
// Gel full command
5867
const cmd = cmds.join(' && ')
5968

6069
// Get commit records from git repo

0 commit comments

Comments
 (0)