Application launch path should use native path functions
This commit is contained in:
parent
efae57a1eb
commit
39fe07d742
1 changed files with 3 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ import { parseMI, MINode } from '../mi_parse';
|
|||
import * as net from "net"
|
||||
import * as fs from "fs"
|
||||
import { posix } from "path"
|
||||
import * as nativePath from "path"
|
||||
let path = posix;
|
||||
var Client = require("ssh2").Client;
|
||||
|
||||
|
|
@ -26,8 +27,8 @@ export class MI2 extends EventEmitter implements IBackend {
|
|||
}
|
||||
|
||||
load(cwd: string, target: string): Thenable<any> {
|
||||
if (!path.isAbsolute(target.replace(/\\/g, "/")))
|
||||
target = path.join(cwd.replace(/\\/g, "/"), target.replace(/\\/g, "/"));
|
||||
if (!nativePath.isAbsolute(target))
|
||||
target = nativePath.join(cwd, target);
|
||||
return new Promise((resolve, reject) => {
|
||||
this.isSSH = false;
|
||||
this.process = ChildProcess.spawn(this.application, this.preargs.concat([target]), { cwd: cwd });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue