Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with using --force error when no track was previously loaded #2061

Merged
merged 1 commit into from
Jun 20, 2021

Conversation

cmdcolin
Copy link
Collaborator

If --force was used but no track/file existed there to overwrite, then the script failed

This checks for the file existing

This code is a little tedious and it would be sorta nice if we could "operate at a slightly higher level of abstraction" than the raw fs module, but this does fix the issue :)

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Jun 20, 2021
@codecov
Copy link

codecov bot commented Jun 20, 2021

Codecov Report

Merging #2061 (41def8b) into main (34a2ec7) will not change coverage.
The diff coverage is 66.66%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2061   +/-   ##
=======================================
  Coverage   61.27%   61.27%           
=======================================
  Files         480      480           
  Lines       22981    22981           
  Branches     5271     5271           
=======================================
  Hits        14082    14082           
  Misses       8624     8624           
  Partials      275      275           
Impacted Files Coverage Δ
products/jbrowse-cli/src/commands/add-track.ts 53.27% <66.66%> (ø)
packages/core/util/index.ts 78.30% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34a2ec7...41def8b. Read the comment docs.

@cmdcolin cmdcolin changed the title Check for file existing before unlink Fix issue with using --force error when no track was previously loaded Jun 20, 2021
@cmdcolin cmdcolin merged commit 9a390b8 into main Jun 20, 2021
@cmdcolin cmdcolin deleted the fix_force_cli branch June 20, 2021 19:50
@garrettjstevens garrettjstevens added bug Something isn't working and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants