Skip to content

Commit

Permalink
fix(compile): set defaults for cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
qvalentin committed Jan 6, 2024
1 parent c9a7ea8 commit c759a1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"plugins": {
"@release-it/conventional-changelog": {
"preset": {
"name": "angular"
"name": "conventionalcommits"
},
"infile": "CHANGELOG.md"
}
Expand Down
7 changes: 4 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function activate(_: vscode.ExtensionContext) {

const workSpacePath = vscode.workspace.workspaceFolders?.[0].uri.path;
const filePath = vscode.window.activeTextEditor?.document.fileName;
var cwd: string
var cwd: string = workSpacePath ?? "";

console.log("Workspace path: " + workSpacePath, "File path: " + filePath);
if (workSpacePath && fs.existsSync(path.join(workSpacePath, "Chart.yaml"))) {
Expand Down Expand Up @@ -57,8 +57,9 @@ export async function activate(_: vscode.ExtensionContext) {
documentSelector: [{ scheme: "file", language: "helm" }],
synchronize: {},
workspaceFolder: {
uri: url.pathToFileURL(cwd),
name: vscode.workspace.workspaceFolders?.[0].name,
uri: vscode.Uri.file(cwd),
name: vscode.workspace.workspaceFolders?.[0].name ?? "",
index: 0
}
};

Expand Down

0 comments on commit c759a1a

Please sign in to comment.