chore: fix format
This commit is contained in:
@@ -4,7 +4,10 @@ import chalk from 'chalk';
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from 'url';
|
||||||
import { log, findProjectRoot, resolveEnvVariable, isEmpty } from './utils.js';
|
import { log, findProjectRoot, resolveEnvVariable, isEmpty } from './utils.js';
|
||||||
import { LEGACY_CONFIG_FILE, TASKMASTER_DIR } from '../../src/constants/paths.js';
|
import {
|
||||||
|
LEGACY_CONFIG_FILE,
|
||||||
|
TASKMASTER_DIR
|
||||||
|
} from '../../src/constants/paths.js';
|
||||||
import { findConfigPath } from '../../src/utils/path-utils.js';
|
import { findConfigPath } from '../../src/utils/path-utils.js';
|
||||||
import {
|
import {
|
||||||
VALIDATED_PROVIDERS,
|
VALIDATED_PROVIDERS,
|
||||||
@@ -113,7 +116,8 @@ function _loadAndValidateConfig(explicitRoot = null) {
|
|||||||
let configExists = false;
|
let configExists = false;
|
||||||
|
|
||||||
// During initialization (no project markers), skip config file search entirely
|
// During initialization (no project markers), skip config file search entirely
|
||||||
const hasProjectMarkers = fs.existsSync(path.join(rootToUse, TASKMASTER_DIR)) ||
|
const hasProjectMarkers =
|
||||||
|
fs.existsSync(path.join(rootToUse, TASKMASTER_DIR)) ||
|
||||||
fs.existsSync(path.join(rootToUse, LEGACY_CONFIG_FILE));
|
fs.existsSync(path.join(rootToUse, LEGACY_CONFIG_FILE));
|
||||||
|
|
||||||
if (hasProjectMarkers) {
|
if (hasProjectMarkers) {
|
||||||
@@ -213,8 +217,12 @@ function _loadAndValidateConfig(explicitRoot = null) {
|
|||||||
} else {
|
} else {
|
||||||
// Don't warn about missing config during initialization
|
// Don't warn about missing config during initialization
|
||||||
// Only warn if this looks like an existing project (has .taskmaster dir or legacy config marker)
|
// Only warn if this looks like an existing project (has .taskmaster dir or legacy config marker)
|
||||||
const hasTaskmasterDir = fs.existsSync(path.join(rootToUse, TASKMASTER_DIR));
|
const hasTaskmasterDir = fs.existsSync(
|
||||||
const hasLegacyMarker = fs.existsSync(path.join(rootToUse, LEGACY_CONFIG_FILE));
|
path.join(rootToUse, TASKMASTER_DIR)
|
||||||
|
);
|
||||||
|
const hasLegacyMarker = fs.existsSync(
|
||||||
|
path.join(rootToUse, LEGACY_CONFIG_FILE)
|
||||||
|
);
|
||||||
|
|
||||||
if (hasTaskmasterDir || hasLegacyMarker) {
|
if (hasTaskmasterDir || hasLegacyMarker) {
|
||||||
console.warn(
|
console.warn(
|
||||||
|
|||||||
@@ -221,7 +221,10 @@ export function initTaskMaster(overrides = {}) {
|
|||||||
// Always set default paths first
|
// Always set default paths first
|
||||||
// These can be overridden below if needed
|
// These can be overridden below if needed
|
||||||
paths.configPath = path.join(paths.projectRoot, TASKMASTER_CONFIG_FILE);
|
paths.configPath = path.join(paths.projectRoot, TASKMASTER_CONFIG_FILE);
|
||||||
paths.statePath = path.join(paths.taskMasterDir || path.join(paths.projectRoot, TASKMASTER_DIR), 'state.json');
|
paths.statePath = path.join(
|
||||||
|
paths.taskMasterDir || path.join(paths.projectRoot, TASKMASTER_DIR),
|
||||||
|
'state.json'
|
||||||
|
);
|
||||||
paths.tasksPath = path.join(paths.projectRoot, TASKMASTER_TASKS_FILE);
|
paths.tasksPath = path.join(paths.projectRoot, TASKMASTER_TASKS_FILE);
|
||||||
|
|
||||||
// Handle overrides - only validate/resolve if explicitly provided
|
// Handle overrides - only validate/resolve if explicitly provided
|
||||||
|
|||||||
Reference in New Issue
Block a user