Merge pull request #16 from EscapeB/fix/fix_sparse_service_load_path

fix: fix sparo profile load path in SparoProfileService
This commit is contained in:
Pete Gonzalez 2024-02-22 10:52:14 -08:00 committed by GitHub
commit 4f38fcb58e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View file

@ -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';
@ -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
});

View file

@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "sparo",
"comment": "fix load path in sparo profile service",
"type": "none"
}
],
"packageName": "sparo"
}