Makefile - Use resolved config dir in remove-local target - #660
Open
marcleblanc2 wants to merge 1 commit into
Open
Makefile - Use resolved config dir in remove-local target#660marcleblanc2 wants to merge 1 commit into
marcleblanc2 wants to merge 1 commit into
Conversation
The %/build target installs local plugins to the config directory resolved by cmd/contrib/scripts/config_dir_getter.go, but the %/remove-local target hardcoded the legacy ~/.op path. On machines using a newer config location (e.g. ~/.config/op), remove-local silently deleted nothing. Use the same plugins_dir variable as the build target. Amp-Thread-ID: https://ampcode.com/threads/T-01a02ae6-d30c-77eb-a4f8-de0711282a78 Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
The
%/remove-localMakefile target hardcoded the legacy~/.op/plugins/local/path, while%/buildinstalls to the config directory resolved bycmd/contrib/scripts/config_dir_getter.go(per the config directory precedence docs). On machines using a newer config location such as~/.config/op,make <plugin>/remove-localsilently deleted nothing.This changes
remove-localto use the same$(plugins_dir)variable as the build target.Type of change
Related Issue(s)
None.
How To Test
On a machine whose config dir resolves to
~/.config/op(i.e. no legacy~/.opdirectory and noOP_CONFIG_DIRset):Before this change, the dry run printed the legacy
~/.op/plugins/local/<plugin>path, so the plugin was never removed.Changelog
The
make <plugin>/remove-localcommand now removes locally built plugins from the same config directory thatmake <plugin>/buildinstalls them to.