Skip to content

Commit

Permalink
improve wording of the update workspace version dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Techatrix committed Jan 23, 2025
1 parent 27789ea commit 8fce2ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/zigSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ async function showUpdateWorkspaceVersionDialog(
version: semver.SemVer,
source?: WantedZigVersionSource,
): Promise<void> {
const buttonVerb = source ? "update" : "create";

const workspace = getWorkspaceFolder();

source ??= workspace
Expand All @@ -305,7 +307,7 @@ async function showUpdateWorkspaceVersionDialog(
let sourceName;
switch (source) {
case WantedZigVersionSource.workspaceZigVersionFile:
sourceName = ".ziversion";
sourceName = ".zigversion";
break;
case WantedZigVersionSource.workspaceBuildZigZon:
sourceName = "build.zig.zon";
Expand All @@ -316,8 +318,8 @@ async function showUpdateWorkspaceVersionDialog(
}

const response = await vscode.window.showInformationMessage(
"Would you like to save this version for this workspace?",
`update ${sourceName}`,
`Would you like to save Zig ${version.toString()} in this workspace?`,
`${buttonVerb} ${sourceName}`,
);
if (!response) return;

Expand Down

0 comments on commit 8fce2ab

Please sign in to comment.