Open TimNZ opened 10 years ago
I won't do a pull request as you may want to do something different but I add this to top of bin/charged:
var util = require('util')
, readline = require('readline')
, resolve_ = require('path').resolve
, spawn = require('child_process').spawn
, fs = require('fs')
, isatty = require('tty').isatty
, os = require('os')
, charged = require('../');
function resolve()
{
if (os.platform() != 'win32')
return resolve_.apply(resolve_, arguments);
var a = resolve_.apply(resolve_, arguments);
var r = /^[A-Za-z]:(.*)$/;
var m = a.match(r);
return m[1].replace('\\','/');
}
using the REPL shell and all ls commands fail.
Done some debugging and see that when attempting a 'ls' the following line ends up with an incorrect path on Windows, I expect you only tested on *nix based system.
bin\charged: 74
Resolves to 'c:\', subsequent request attempts then fail