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

Introduce imosid force option for overwriting files #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Sep 21, 2023

Description

This PR introduces a new force option in the imosid command-line tool. The force option allows the tool to overwrite files without checking if they have modified or invalid sections. This can be useful in certain scenarios where the user wants to forcefully update the files.

Summary of Changes

  • Modified the command-line argument parsing code in src/app.rs to add a new command-line argument for the force option in the apply subcommand.
  • Modified the DotFile::applyfile function in src/files.rs to accept an additional boolean parameter indicating whether the force option is enabled.
  • Added a condition in the DotFile::applyfile function to skip the checks for modifications and invalid sections if the force option is enabled.
  • Added a condition in the DotFile::write_to_file function to skip the checks for modifications and invalid sections if the force option is enabled.

Fixes #3.


🎉 Latest improvements to Sweep:


💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
0 participants