Skip to content

Commit

Permalink
Merge pull request #16 from EscapeB/fix/fix_sparse_service_load_path
Browse files Browse the repository at this point in the history
fix: fix sparo profile load path in SparoProfileService
  • Loading branch information
octogonz authored Feb 22, 2024
2 parents 9df6a93 + f71a5e5 commit 4f38fcb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/sparo-lib/src/services/SparoProfileService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FileSystem, Async } from '@rushstack/node-core-library';
import path from 'path';
import { inject } from 'inversify';
import { Service } from '../decorator';
import { SparoProfile } from '../logic/SparoProfile';
Expand All @@ -22,7 +23,12 @@ export class SparoProfileService {
public async loadProfilesAsync(): Promise<void> {
if (!this._loadPromise) {
this._loadPromise = (async () => {
const sparoProfileFolder: string = defaultSparoProfileFolder;
const repoRoot: string = this._gitService.getRepoInfo().root;
const sparoProfileFolder: string = path.resolve(repoRoot, defaultSparoProfileFolder);
this._terminalService.terminal.writeDebugLine(
'loading sparse profiles from folder:',
sparoProfileFolder
);
const sparoProfilePaths: string[] = await FileSystem.readFolderItemNamesAsync(sparoProfileFolder, {
absolutePaths: true
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "sparo",
"comment": "fix load path in sparo profile service",
"type": "none"
}
],
"packageName": "sparo"
}

0 comments on commit 4f38fcb

Please sign in to comment.