Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
0cda2c0c
Commit
0cda2c0c
authored
Mar 02, 2021
by
fdeitylink
Committed by
Pablo Aguiar
Mar 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packages: support {$pkg}_uninstall events
Emit uninstall events independent of uninstall.fish
parent
b27b3b5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
docs/en-US/Packages.md
docs/en-US/Packages.md
+1
-0
pkg/omf/functions/packages/omf.packages.remove.fish
pkg/omf/functions/packages/omf.packages.remove.fish
+5
-2
No files found.
docs/en-US/Packages.md
View file @
0cda2c0c
...
...
@@ -120,6 +120,7 @@ Inside this hook, you can access two package-related variables:
Packages can use this hook to clean up custom resources, etc.
> Note: for backwards-compatibility, uninstall hooks will also be run if they are located at `uninstall.fish` in the package root.
> Hooks may also be triggered by listening for the event `{$package}_uninstall` or `uninstall_$package`.
# Make it public
...
...
pkg/omf/functions/packages/omf.packages.remove.fish
View file @
0cda2c0c
...
...
@@ -17,8 +17,11 @@ function omf.packages.remove -a pkg
# Run uninstall hook first.
omf.packages.run_hook $path uninstall
source $path/uninstall.fish 2> /dev/null;
and emit uninstall_$pkg
if test -f $path/uninstall.fish
source $path/uninstall.fish 2> /dev/null
end
emit uninstall_$pkg
emit {$pkg}_uninstall
if command rm -rf $path
omf.bundle.remove "package" $pkg
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment