Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsMeBrianD committed Feb 13, 2025
1 parent 0fd3769 commit e79b8b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/lib/sdk/src/plugins/datasources/writeSourceConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';
import fs from 'fs/promises';
import { getSafeOptions, getSecretOptions } from './cli/edit/Options.js';
import { encodeBase64Deep } from '../../lib/b64Deep.js';
import { projectRoot, sourcesDirectory } from '../../lib/projectPaths.js';
import { sourcesDirectory } from '../../lib/projectPaths.js';

/**
*
Expand Down Expand Up @@ -36,7 +36,11 @@ export const writeSourceConfig = async (options, source, spinner) => {
yaml.stringify(encodeBase64Deep(secrets))
].join('\n');

if (!source.dir || !path.dirname(source.dir).startsWith(sourcesDirectory) || !path.isAbsolute(source.dir)) {
if (
!source.dir ||
!path.dirname(source.dir).startsWith(sourcesDirectory) ||
!path.isAbsolute(source.dir)
) {
source.dir = path.join(sourcesDirectory, source.name);
}

Expand Down

0 comments on commit e79b8b1

Please sign in to comment.