Skip to content

Commit

Permalink
support for windows drives other than c:
Browse files Browse the repository at this point in the history
  • Loading branch information
stammen committed Nov 21, 2012
1 parent f7d09c5 commit 92868a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/vows
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,13 @@ if (! options.watch) {

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

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

0 comments on commit 92868a9

Please sign in to comment.