Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

ignore non-json/yaml files when forking - #354

Merged
pnickolov merged 2 commits into
mainfrom
pn/fork-skip-binary-files
May 3, 2024
Merged

pnickolov merged 2 commits into
mainfrom
pn/fork-skip-binary-files

Conversation

@pnickolov

Copy link
Copy Markdown
Contributor

Description

When forking a solution, skip files that are not JSON or YAML (e.g., PNG or ZIP) instead of failing the fork. Supported only in the new fork algorithm, whether forking from a directory or from a platform solution.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

Comment thread cmd/solution/fork.go Outdated
return fmt.Errorf("error forking file %q: %w", filepath.Join(dirName, file.Name), err)
path := filepath.Join(dirName, file.Name)

if err == ErrUnsupportedEncoding {

@pavel-georgiev pavel-georgiev Apr 26, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A better approach may be to use a custom error.

@pnickolov
pnickolov requested a review from pavel-georgiev May 2, 2024 01:46
@pnickolov
pnickolov merged commit d75a607 into main May 3, 2024
@pnickolov
pnickolov deleted the pn/fork-skip-binary-files branch May 3, 2024 00:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址