Executable paths should be absolute using native path functions
This commit is contained in:
parent
39fe07d742
commit
cae555af40
2 changed files with 5 additions and 1 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "debug",
|
"name": "debug",
|
||||||
"displayName": "Debug",
|
"displayName": "Debug",
|
||||||
"description": "Native debugging for VSCode - Currently in GDB only beta",
|
"description": "Native debugging for VSCode - Currently in GDB only beta",
|
||||||
"version": "0.3.2",
|
"version": "0.3.3",
|
||||||
"publisher": "webfreak",
|
"publisher": "webfreak",
|
||||||
"icon": "images/icon-plain.svg",
|
"icon": "images/icon-plain.svg",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,8 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
attach(cwd: string, executable: string, target: string): Thenable<any> {
|
attach(cwd: string, executable: string, target: string): Thenable<any> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let args = [];
|
let args = [];
|
||||||
|
if (executable && !nativePath.isAbsolute(executable))
|
||||||
|
executable = nativePath.join(cwd, executable);
|
||||||
if (!executable)
|
if (!executable)
|
||||||
executable = "-p";
|
executable = "-p";
|
||||||
args = args.concat([executable, target], this.preargs);
|
args = args.concat([executable, target], this.preargs);
|
||||||
|
|
@ -151,6 +153,8 @@ export class MI2 extends EventEmitter implements IBackend {
|
||||||
connect(cwd: string, executable: string, target: string): Thenable<any> {
|
connect(cwd: string, executable: string, target: string): Thenable<any> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let args = [];
|
let args = [];
|
||||||
|
if (executable && !nativePath.isAbsolute(executable))
|
||||||
|
executable = nativePath.join(cwd, executable);
|
||||||
if (executable)
|
if (executable)
|
||||||
args = args.concat([executable], this.preargs);
|
args = args.concat([executable], this.preargs);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue