Skip to content

Commit 92868a9

Browse files
committed
support for windows drives other than c:
1 parent f7d09c5 commit 92868a9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

bin/vows

+7-3
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,13 @@ if (! options.watch) {
257257

258258
// add full path if necessary
259259
files = args.map(function (a) {
260-
return (!a.match(/^\/|c:|C:/))
261-
? path.join(process.cwd(), a)
262-
: a;
260+
if(process.platform === 'win32') {
261+
// check if path starts with a valid windows drive name
262+
return (!a.match(/^[a-z]:/i))? path.join(process.cwd(), a) : a;
263+
} else {
264+
// check if path starts at root
265+
return (!a.match(/^\//))? path.join(process.cwd(), a) : a;
266+
}
263267
});
264268

265269
// preprocess the list of files for any wildcards. win32 does not handle wildcards before calling vows

0 commit comments

Comments
 (0)