Skip to content

Commit 824ee76

Browse files
Add temporary console logs for debugging branch-related operations
1 parent bfd1510 commit 824ee76

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34401,6 +34401,7 @@ const previewUpdater = async () => {
3440134401
const branchExists = await repo.branchExists();
3440234402
(0, core_1.info)(`Checkout ${branchExists ? 'existing' : 'new'} branch named "${repo.branchName()}"`);
3440334403
await repo.checkoutBranch(!branchExists);
34404+
console.log('aaaa', branchExists);
3440434405
// Read file
3440534406
const content = (0, filesystem_1.readFile)(config, config.path.readme);
3440634407
const preview = (0, preview_1.setPreview)(content, config);
@@ -34775,6 +34776,7 @@ class Repository {
3477534776
async checkoutBranch(isNew) {
3477634777
try {
3477734778
this._newBranch = isNew;
34779+
console.log('bbb', isNew);
3477834780
await (0, filesystem_1.exec)(`git switch ${isNew ? '-c' : ''} "${this.branchName()}"`);
3477934781
}
3478034782
catch (error) {

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ const previewUpdater = async () => {
3535
info(`Checkout ${ branchExists ? 'existing' : 'new' } branch named "${ repo.branchName() }"`)
3636
await repo.checkoutBranch(! branchExists)
3737

38+
console.log('aaaa', branchExists)
39+
3840
// Read file
3941
const content = readFile(config, config.path.readme)
4042
const preview = setPreview(content, config)

src/utils/repository.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export class Repository
4141
{
4242
try {
4343
this._newBranch = isNew
44+
45+
console.log('bbb', isNew)
4446

4547
await exec(`git switch ${ isNew ? '-c' : '' } "${ this.branchName() }"`)
4648
} catch (error) {

0 commit comments

Comments
 (0)