Skip to content

Makefile - Use resolved config dir in remove-local target - #660

Open
marcleblanc2 wants to merge 1 commit into
1Password:mainfrom
marcleblanc2:fix-remove-local
Open

Makefile - Use resolved config dir in remove-local target#660
marcleblanc2 wants to merge 1 commit into
1Password:mainfrom
marcleblanc2:fix-remove-local

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Aug 22, 2026

Copy link
Copy Markdown

Overview

The %/remove-local Makefile target hardcoded the legacy ~/.op/plugins/local/ path, while %/build installs to the config directory resolved by cmd/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-local silently deleted nothing.

This changes remove-local to use the same $(plugins_dir) variable as the build target.

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

Related Issue(s)

None.

How To Test

On a machine whose config dir resolves to ~/.config/op (i.e. no legacy ~/.op directory and no OP_CONFIG_DIR set):

make <plugin>/build
make -n <plugin>/remove-local   # dry run: should print rm -f ~/.config/op/plugins/local/<plugin>
make <plugin>/remove-local      # removes the locally built plugin

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-local command now removes locally built plugins from the same config directory that make <plugin>/build installs them to.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant