diff --git a/package/commands/gacm/useLs.ts b/package/commands/gacm/useLs.ts index bcad756..bd915ba 100644 --- a/package/commands/gacm/useLs.ts +++ b/package/commands/gacm/useLs.ts @@ -13,9 +13,13 @@ export const useLs = async () => { (await getFileUser(registriesPath)) || ({ version: pkg.version, users: [], registry: [] } as UserInfoJson); - const currectUser = await execCommand('git', ['config', 'user.name']); + const currectUser = await execCommand('git', ['config', 'user.name']).catch( + () => {} + ); - const currectEmail = await execCommand('git', ['config', 'user.email']); + const currectEmail = await execCommand('git', ['config', 'user.email']).catch( + () => {} + ); if (userList.users.length === 0 && (!currectUser || !currectEmail)) { return log.info('no user');