Skip to content

Commit e89467c

Browse files
authored
Append .pkg to package name when passed to source control / server command extensions (#776)
1 parent 421ea58 commit e89467c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/utils/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,13 @@ export function getServerName(uri: vscode.Uri): string {
238238
return uri.path;
239239
} else {
240240
// Complex case: replace folder slashes with dots.
241-
return uri.path.slice(1).replace(/\//g, ".");
241+
const filePath = uri.path.slice(1);
242+
let serverName = filePath.replace(/\//g, ".");
243+
if (!filePath.split("/").pop().includes(".")) {
244+
// This is a package so add the .PKG extension
245+
serverName += ".PKG";
246+
}
247+
return serverName;
242248
}
243249
}
244250

0 commit comments

Comments
 (0)