Skip to content

Conversation

@BasixKOR
Copy link
Contributor

What's the problem this PR addresses?

Fixes #6521.

...

How did you fix it?

Use Git CLI instead to detect if git init is nesscary.
...

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

});

if (!xfs.existsSync(ppath.join(this.context.cwd, `.git`))) {
const isGitRepo = (await execUtils.execvp(`git`, [`rev-parse`, `--is-inside-work-tree`], {cwd: this.context.cwd})).code === 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably too terse to be merged directly, but I wasn't sure which style I should pick since there's no automated formatter available. I'll apply your stylistic suggestion if you have one.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name: Check Code @Formatting

Suggested change
const isGitRepo = (await execUtils.execvp(`git`, [`rev-parse`, `--is-inside-work-tree`], {cwd: this.context.cwd})).code === 0;
const isGitRepo = (await execUtils.execvp(`git`, [`rev-parse`, `--is-inside-work-tree`], {cwd: this.context.cwd})).code === 0;

on:
pull_request:
branches: [main]

jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

  - name: Setup Node
    uses: actions/setup-node@v3
    with:
      node-version: '20'
      
  - name: Install Prettier
    run: npm install -g prettier
      
  - name: Check formatting
    run: prettier --check "src/**/*.{js,jsx,ts,tsx,json,css,md}"

@arcanis
Copy link
Member

arcanis commented Oct 1, 2024

Seems like a reasonable approach - can you add a test to avoid regressions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug?]: Integration glitches with nested projects

3 participants