Skip to content

Commit b804284

Browse files
committed
refactoring changes
1 parent b31d615 commit b804284

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/toolchain/swiftly.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ export class Swiftly {
127127
const response = ListResult.parse(JSON.parse(stdout));
128128
return response.toolchains.map(t => t.version.name);
129129
} catch (error) {
130-
outputChannel?.appendLine(`Failed to retrieve Swiftly installations: ${error}`);
130+
outputChannel?.appendLine(
131+
`Failed to retrieve Swiftly installations : ${error}`);
131132
return [];
132133
}
133134
}
@@ -220,7 +221,8 @@ export class Swiftly {
220221
const error = err as ExecFileError;
221222
// Its possible the toolchain in .swift-version is misconfigured or doesn't exist.
222223
void vscode.window.showErrorMessage(
223-
`Failed to load toolchain from Swiftly: ${error.stderr}`);
224+
`Failed to load toolchain from Swiftly: ${error.stderr}`
225+
);
224226
}
225227
}
226228
}

test/unit-tests/toolchain/swiftly.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,12 @@ suite("Swiftly Unit Tests", () => {
7979
],
8080
};
8181

82-
mockUtilities.execFile.withArgs("swiftly", ["list", "--format=json"]).resolves({
83-
stdout: JSON.stringify(jsonOutput),
84-
stderr: "",
85-
});
82+
mockUtilities.execFile
83+
.withArgs("swiftly", ["list", "--format=json"])
84+
.resolves({
85+
stdout: JSON.stringify(jsonOutput),
86+
stderr: "",
87+
});
8688

8789
const result = await Swiftly.listAvailableToolchains();
8890

0 commit comments

Comments
 (0)