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:
Getting Sweep to run linters before committing! Check out Sweep Sandbox Configs to set it up.
Added support for self-hosting! Check out Self-hosting Sweep to get started.
[Self Hosting] Multiple options to compute vector embeddings, configure your .env file using VECTOR_EMBEDDING_SOURCE
π‘ 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
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
src/app.rs
to add a new command-line argument for the force option in theapply
subcommand.DotFile::applyfile
function insrc/files.rs
to accept an additional boolean parameter indicating whether the force option is enabled.DotFile::applyfile
function to skip the checks for modifications and invalid sections if the force option is enabled.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: