Skip to content

Commit 7ae4e50

Browse files
committed
- Add some debug lines to see which part failed in CI
- Unified return for the dependencies command to return boolean
1 parent eb45754 commit 7ae4e50

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

src/commands/dependencies/resolve.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import { executeTaskWithUI, updateAfterError } from "../utilities";
2424
export async function resolveDependencies(ctx: WorkspaceContext) {
2525
const current = ctx.currentFolder;
2626
if (!current) {
27-
return;
27+
ctx.outputChannel.log("currentFolder is not set.");
28+
return false;
2829
}
2930
return await resolveFolderDependencies(current);
3031
}

src/commands/dependencies/unedit.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ import { FolderContext } from "../../FolderContext";
2626
export async function uneditDependency(identifier: string, ctx: WorkspaceContext) {
2727
const currentFolder = ctx.currentFolder;
2828
if (!currentFolder) {
29-
return;
29+
ctx.outputChannel.log("currentFolder is not set.");
30+
return false;
3031
}
3132
ctx.outputChannel.log(`unedit dependency ${identifier}`, currentFolder.name);
3233
const status = `Reverting edited dependency ${identifier} (${currentFolder.name})`;
@@ -80,12 +81,13 @@ async function uneditFolderDependency(
8081

8182
if (result === "No") {
8283
ctx.outputChannel.log(execError.stderr, folder.name);
83-
return;
84+
return false;
8485
}
8586
await uneditFolderDependency(folder, identifier, ctx, ["--force"]);
8687
} else {
8788
ctx.outputChannel.log(execError.stderr, folder.name);
8889
vscode.window.showErrorMessage(`${execError.stderr}`);
8990
}
91+
return false;
9092
}
9193
}

src/commands/dependencies/update.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import { executeTaskWithUI, updateAfterError } from "./../utilities";
2424
export async function updateDependencies(ctx: WorkspaceContext) {
2525
const current = ctx.currentFolder;
2626
if (!current) {
27-
return;
27+
ctx.outputChannel.log("currentFolder is not set.");
28+
return false;
2829
}
2930
return await updateFolderDependencies(current);
3031
}

src/commands/dependencies/useLocal.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export async function useLocalDependency(
3030
): Promise<boolean> {
3131
const currentFolder = ctx.currentFolder;
3232
if (!currentFolder) {
33+
ctx.outputChannel.log("currentFolder is not set.");
3334
return false;
3435
}
3536
const folders = await vscode.window.showOpenDialog({

src/ui/SwiftOutputChannel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class SwiftOutputChannel implements vscode.OutputChannel {
2929
logStoreLinesSize: number = 250_000 // default to capturing 250k log lines
3030
) {
3131
this.name = name;
32-
this.logToConsole = process.env["CI"] !== "1" && logToConsole;
32+
// this.logToConsole = process.env["CI"] !== "1" && logToConsole;
3333
this.channel = vscode.window.createOutputChannel(name);
3434
this.logStore = new RollingLog(logStoreLinesSize);
3535
}

0 commit comments

Comments
 (0)