Merge pull request from L-Qun/main

fix: compatible with windows
This commit is contained in:
Cheng Liu 2024-03-04 16:12:55 -08:00 committed by GitHub
commit eb3eda4e4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions
apps/sparo-lib/src/services
common/changes/sparo

View file

@ -98,7 +98,7 @@ export class SparoProfileService {
}
private static _getProfileName(profilePath: string): string {
const pathArr: string[] = profilePath.split('/');
const pathArr: string[] = profilePath.split(path.sep);
const last: string = pathArr[pathArr.length - 1];
if (last.endsWith('.json')) {
return last.slice(0, -5);

View file

@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "sparo",
"comment": "Fix a compatibility issue when getting profile name on Windows OS",
"type": "none"
}
],
"packageName": "sparo"
}