Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
"configuration": {
"title": "Task configuration",
"properties": {
"task": {
"taskfile": {
"type": "object",
"description": "Task configuration options.",
"properties": {
Expand Down
13 changes: 12 additions & 1 deletion src/utils/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { log } from './log.js';

class Settings {
private static _instance: Settings;
private static namespace = "taskfile";
public updateOn!: UpdateOn;
public path!: string;
public outputTo!: OutputTo;
Expand All @@ -23,8 +24,18 @@ class Settings {
public update() {
log.info("Updating settings");

// Check if the old configuration still exists
let oldConfig = vscode.workspace.getConfiguration("task");
if (oldConfig) {
vscode.window.showWarningMessage(`Task changed its configuration namespace from "task" to "taskfile". Your task settings will not be applied until you update your settings accordingly.`, "More Info").then(selection => {
if (selection === "More Info") {
vscode.env.openExternal(vscode.Uri.parse("https://taskfile.dev/docs/integrations#configuration-namespace-change"));
}
});
}

// Get the workspace config
let config = vscode.workspace.getConfiguration("task");
let config = vscode.workspace.getConfiguration(Settings.namespace);

// Set the properties
this.updateOn = config.get("updateOn") ?? UpdateOn.save;
Expand Down
Loading