validateForPatching static method
Validates all source paths before the patcher starts its file transaction.
Keeping this preflight as one operation ensures every caller applies the same root-boundary checks before reading an entry or mutating the pubspec.
Implementation
static String? validateForPatching({
required String appDir,
required File entry,
required bool usesApplicationEntry,
required ExecutionMode mode,
required String configuredPath,
required String activePath,
}) {
validatePathWithinRoot(root: appDir, relativePath: 'pubspec.yaml');
validatePathWithinRoot(root: appDir, relativePath: configuredPath);
return validate(
entry: entry,
usesApplicationEntry: usesApplicationEntry,
mode: mode,
configuredPath: configuredPath,
activePath: activePath,
);
}