mirror of
https://github.com/tiktok/sparo.git
synced 2024-11-14 19:35:12 -05:00
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:
commit
4f38fcb58e
2 changed files with 17 additions and 1 deletions
|
@ -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
|
||||
});
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "sparo",
|
||||
"comment": "fix load path in sparo profile service",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "sparo"
|
||||
}
|
Loading…
Reference in a new issue