Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4899,7 +4899,7 @@
"recursive": {
"type": "boolean",
"description": "%c_cpp.debuggers.deploySteps.copyFile.recursive.description%",
"default": "true"
"default": true
},
"debug": {
"type": "boolean",
Expand Down Expand Up @@ -5700,7 +5700,7 @@
"recursive": {
"type": "boolean",
"description": "%c_cpp.debuggers.deploySteps.copyFile.recursive.description%",
"default": "true"
"default": true
},
"debug": {
"type": "boolean",
Expand Down
6 changes: 3 additions & 3 deletions Extension/src/Debugger/configurationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1115,9 +1115,9 @@ export class DebugConfigurationProvider implements vscode.DebugConfigurationProv

let scpResult: util.ProcessReturnType;
if (isScp) {
scpResult = await scp(files, host, step.targetDir, config.scpPath, config.recursive, jumpHosts, cancellationToken);
scpResult = await scp(files, host, step.targetDir, step.recursive, step.scpPath, jumpHosts, cancellationToken);
} else {
scpResult = await rsync(files, host, step.targetDir, config.scpPath, config.recursive, jumpHosts, cancellationToken);
scpResult = await rsync(files, host, step.targetDir, step.recursive, step.rsyncPath, jumpHosts, cancellationToken);
}

if (!scpResult.succeeded || cancellationToken?.isCancellationRequested) {
Expand All @@ -1134,7 +1134,7 @@ export class DebugConfigurationProvider implements vscode.DebugConfigurationProv
const jumpHosts: util.ISshHostInfo[] = step.host.jumpHosts;
const localForwards: util.ISshLocalForwardInfo[] = step.host.localForwards;
const continueOn: string = step.continueOn;
const sshResult: util.ProcessReturnType = await ssh(host, step.command, config.sshPath, jumpHosts, localForwards, continueOn, cancellationToken);
const sshResult: util.ProcessReturnType = await ssh(host, step.command, step.sshPath, jumpHosts, localForwards, continueOn, cancellationToken);
if (!sshResult.succeeded || cancellationToken?.isCancellationRequested) {
return false;
}
Expand Down
9 changes: 6 additions & 3 deletions Extension/src/SSH/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ export async function rsync(files: vscode.Uri[], host: ISshHostInfo, targetDir:
if (recursive) {
args.push('-r');
}
const sshArgs: string[] = [];
if (jumpHosts && jumpHosts.length > 0) {
args.push('-e', `ssh -J ${jumpHosts.map(getFullHostAddress).join(',')}`);
sshArgs.push('-J', jumpHosts.map(getFullHostAddress).join(','));
}
if (host.port) {
// upper case P
args.push(`--port=${host.port}`);
sshArgs.push('-p', `${host.port}`);
}
if (sshArgs.length > 0) {
args.push('-e', `"ssh ${sshArgs.join(' ')}"`);
}
args.push(files.map(uri => `"${uri.fsPath}"`).join(' '), `${getFullHostAddressNoPort(host)}:${targetDir}`);

Expand Down
2 changes: 1 addition & 1 deletion Extension/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ async function spawnChildProcessImpl(program: string, args: string[], continueOn
stdout += str;
if (continueOn) {
const continueOnReg: string = escapeStringForRegex(continueOn);
if (stdout.search(continueOnReg)) {
if (stdout.search(continueOnReg) >= 0) {
result.resolve({ stdout: stdout.trim(), stderr: stderr.trim() });
}
}
Expand Down
Loading
Loading