Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 8 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"react-window": "^1.8.11",
"sax-ts": "^1.2.13",
"semver": "^7.7.4",
"shell-quote": "^1.8.3",
"tcp-port-used": "^1.0.2",
"vscode-jsonrpc": "^8.2.1",
"vscode-messenger": "~0.6.0",
Expand Down Expand Up @@ -133,6 +134,7 @@
"@types/react-dom": "^18.3.1",
"@types/react-window": "^1.8.8",
"@types/semver": "^7.7.1",
"@types/shell-quote": "^1.7.5",
"@types/targz": "^1.0.5",
"@types/tcp-port-used": "^1.0.4",
"@types/vscode": "^1.63.0",
Expand Down
12 changes: 6 additions & 6 deletions src/views/solution-outline/commands/merge-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import path from 'path';
import * as os from 'os';
import * as fs from 'fs';
import { ActiveSolutionTracker } from '../../../solutions/active-solution-tracker';
import { quote as shellQuote } from 'shell-quote';

export class MergeCommand {
public static readonly mergeFile = `${PACKAGE_NAME}.mergeFile`;
Expand Down Expand Up @@ -89,10 +90,8 @@ export class MergeCommand {
mergedMTimeBefore = fs.statSync(merged).mtimeMs;
}

const command = `"${codePath}" --wait --merge "${local}" "${update}" "${base}" "${merged}"`;

try {
const exitCode = await this.doOpen3WayMerge(command);
const exitCode = await this.doOpen3WayMerge([ codePath, '--wait', '--merge', local, update, base, merged ]);

// get the modification time after merge
let mergedMTimeAfter = 0;
Expand Down Expand Up @@ -183,11 +182,12 @@ export class MergeCommand {
return undefined;
}

private doOpen3WayMerge(command: string): Promise<number> {
private doOpen3WayMerge(command: string[]): Promise<number> {
const args = shellQuote(command);
return new Promise((resolve, reject) => {
exec(command, (error: ExecException | null) => {
exec(args, (error: ExecException | null) => {
if (error) {
console.error(`Error executing command: ${command}`, error);
console.error(`Error executing command: ${args}`, error);

if (typeof error.code === 'number') {
resolve(error.code);
Expand Down
Loading