Skip to content

Commit

Permalink
chore: Issue 159 - Using latest git hooks (#322)
Browse files Browse the repository at this point in the history
#159

[Pre-commit does not support using a latest
tag](https://pre-commit.com/#using-the-latest-version-for-a-repository),
the only way to use latest is to update after install.

I tested these changes by updating the version I installed with brew
re-initializing a test repo with javascript and python code. It looks
like the fix I made to the update command could use a regression test,
that line of code cannot run without a folder path argument.

Co-authored-by: Rob Rodriguez <[email protected]>
  • Loading branch information
RobMRodriguez and Rob Rodriguez authored Nov 2, 2023
1 parent ded2969 commit 4b77d27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions secureli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def init(
"""
SecureliConfig.FOLDER_PATH = Path(directory)
container.initializer_action().initialize_repo(Path(directory), reset, yes)
update()


@app.command()
Expand Down
2 changes: 1 addition & 1 deletion secureli/services/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def update_hooks(
output = "No changes necessary.\n"

if update_result.successful and update_result.output:
prune_result = self.pre_commit.remove_unused_hooks()
prune_result = self.pre_commit.remove_unused_hooks(folder_path)
output = output + "\nRemoving unused environments:\n" + prune_result.output

return UpdateResult(successful=update_result.successful, output=output)
Expand Down

0 comments on commit 4b77d27

Please sign in to comment.